diff options
Diffstat (limited to 'spec/controllers')
-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 |