diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-09-20 15:06:32 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-09-20 15:06:32 +0100 |
commit | add084ee6047d3cae72e3e445135b122d8ba2cc8 (patch) | |
tree | f9763b73753c44562d6572035ab71b4bae2957a0 /spec/controllers/api_controller_spec.rb | |
parent | 69103f5e83d538cd3aa9a3ea39cc5736aaec21e8 (diff) | |
parent | aebcdc082f277b3569d1300ebeda43c503d8aec5 (diff) |
Merge branch 'release/0.6.6'0.6.6
Conflicts:
locale/cs/app.po
locale/es/app.po
Diffstat (limited to 'spec/controllers/api_controller_spec.rb')
-rw-r--r-- | spec/controllers/api_controller_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index 925b7adb4..ded9a040a 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -320,6 +320,21 @@ 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 + 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 => "atom" + + response.should be_success + response.should render_template("api/request_events.atom") + assigns[:events].size.should > 0 + assigns[:events].each do |event| + event.created_at.should >= Date.new(2010, 1, 1) + end + end + it "should return a JSON 404 error for non-existent requests" do request_id = 123459876 # Let's hope this doesn't exist! sent_at = "2012-05-28T12:35:39+01:00" |