diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-08-11 12:49:56 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-08-11 12:49:56 +0100 |
commit | 554518eff4c5287f11ecf90db243aa00921a5667 (patch) | |
tree | c50e54eda7bc6d9b3abbb33fb3e5403cd740b5de /spec/controllers/api_controller_spec.rb | |
parent | a760114de869ce3f07358dde19b8b5cc5d36003b (diff) | |
parent | 77a923dd67d9638d1dc7b3b731e3e654b6b67475 (diff) |
Merge branch 'issues/1709-use-event-id-in-query' into rails-3-develop
Diffstat (limited to 'spec/controllers/api_controller_spec.rb')
-rw-r--r-- | spec/controllers/api_controller_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index 7b1d73e8a..323ef4cd4 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -514,7 +514,7 @@ describe ApiController, "when using the API" do assigns[:event_data].should == [first_event] end - it 'should honour the since_date parameter for the Atom feed' do + it 'should honour the since_date parameter' do get :body_request_events, :id => public_bodies(:humpadink_public_body).id, :k => public_bodies(:humpadink_public_body).api_key, @@ -527,6 +527,15 @@ describe ApiController, "when using the API" do assigns[:events].each do |event| event.created_at.should >= Date.new(2010, 1, 1) end + + get :body_request_events, + :id => public_bodies(:humpadink_public_body).id, + :k => public_bodies(:humpadink_public_body).api_key, + :since_date => '2010-01-01', + :feed_type => 'json' + assigns[:events].each do |event| + event.created_at.should >= Date.new(2010, 1, 1) + end end end end |