From c3d681639a73892ab85987c577774cfb67ec1a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20G=C3=A9ry?= Date: Fri, 3 Jun 2016 18:22:50 +0200 Subject: [PATCH] add a assertion --- .../spec/controllers/api/v1/analytics_controller_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api-umbrella/web-app/spec/controllers/api/v1/analytics_controller_spec.rb b/src/api-umbrella/web-app/spec/controllers/api/v1/analytics_controller_spec.rb index 0f65db5fe..627a23f2f 100644 --- a/src/api-umbrella/web-app/spec/controllers/api/v1/analytics_controller_spec.rb +++ b/src/api-umbrella/web-app/spec/controllers/api/v1/analytics_controller_spec.rb @@ -30,6 +30,7 @@ response.status.should eql(200) data = MultiJson.load(response.body) + data["results"].length.should be > 0 data["results"][0]["hits"].should eql(2) data["hits_over_time"]["rows"][0]["c"][0]["f"].should eql("Tue, Jan 13, 2015") data["hits_over_time"]["rows"][0]["c"][0]["v"].should eql(1421132400000) @@ -64,6 +65,7 @@ response.status.should eql(200) data = MultiJson.load(response.body) + data["results"].length.should be > 0 data["results"][0]["hits"].should eql(4) data["hits_over_time"]["rows"][0]["c"][0]["f"].should eql("Sat, Mar 7, 2015") data["hits_over_time"]["rows"][0]["c"][0]["v"].should eql(1425711600000) @@ -100,6 +102,7 @@ response.status.should eql(200) data = MultiJson.load(response.body) + data["results"].length.should be > 0 data["results"][0]["hits"].should eql(2) data["hits_over_time"]["rows"][0]["c"][0]["f"].should eql("Sun, Mar 8, 2015 12:00am MST") data["hits_over_time"]["rows"][0]["c"][0]["v"].should eql(1425798000000) @@ -142,6 +145,7 @@ response.status.should eql(200) data = MultiJson.load(response.body) + data["results"].length.should be > 0 data["results"][0]["hits"].should eql(4) data["hits_over_time"]["rows"][0]["c"][0]["f"].should eql("Sat, Nov 1, 2014") data["hits_over_time"]["rows"][0]["c"][0]["v"].should eql(1414821600000) @@ -178,6 +182,7 @@ response.status.should eql(200) data = MultiJson.load(response.body) + data["results"].length.should be > 0 data["results"][0]["hits"].should eql(2) data["hits_over_time"]["rows"][1]["c"][0]["f"].should eql("Sun, Nov 2, 2014 1:00am MDT") data["hits_over_time"]["rows"][1]["c"][0]["v"].should eql(1414911600000)