aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/api_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-02-19 10:18:10 +0000
committerLouise Crow <louise.crow@gmail.com>2014-02-19 10:18:10 +0000
commit17bc0ba1bca6783b76957f5769e2e9d96d0ee8e4 (patch)
tree15b933fee15118d276f22e6bd94f7b9ac941bea1 /spec/controllers/api_controller_spec.rb
parent4218258787f0e9affd5f84baa078d9d32e8bae3d (diff)
parent95169c33db002c04a6a31a6a5db1ea59668f1292 (diff)
Merge branch 'hotfix/0.16.0.7' into wdtk
Diffstat (limited to 'spec/controllers/api_controller_spec.rb')
-rw-r--r--spec/controllers/api_controller_spec.rb12
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,