diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-01-28 09:17:45 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-01-28 09:17:45 +0000 |
commit | d9136f001e20df18928c1a6818347930fae27a52 (patch) | |
tree | 6fde8e2cd9e11dab65607a4b73eef8b095966527 /spec/controllers | |
parent | bc6531d545810935bec8e847f59830d23e509e13 (diff) |
Handle a request with no user in the show request function0.16.0.5hotfix/0.16.0.5
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/api_controller_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index 8e9d17fbe..2b1c515f7 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -282,6 +282,18 @@ describe ApiController, "when using the API" do # check, which does not really test anything at all. end + it 'should show information about an external request' do + info_request = info_requests(:external_request) + get :show_request, + :k => public_bodies(:geraldine_public_body).api_key, + :id => info_request.id + + response.should be_success + assigns[:request].id.should == info_request.id + r = ActiveSupport::JSON.decode(response.body) + r["title"].should == info_request.title + end + it "should show an Atom feed of new request events" do get :body_request_events, :id => public_bodies(:geraldine_public_body).id, |