diff options
author | Francis Irving <francis@mysociety.org> | 2010-10-20 15:58:58 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-10-20 15:58:58 +0100 |
commit | 7b85b81d1076169a9b01c301545f0f9192540f97 (patch) | |
tree | 07b9afb00dd2c2604025e5ff79a51bd0296d1c28 /spec/controllers/request_controller_spec.rb | |
parent | e36720f39d8e8e89f5adf396aa76cd2509574da3 (diff) |
Return more info in request JSON response.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index eddbe7869..648a66e28 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1225,15 +1225,15 @@ describe RequestController, "when showing JSON version for API" do fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :raw_emails, :outgoing_messages, :comments - it "should be successful" do + it "should return data in JSON form" do get :show, :url_title => 'why_do_you_have_such_a_fancy_dog', :format => 'json' ir = JSON.parse(response.body) ir.class.to_s.should == 'Hash' ir['url_title'].should == 'why_do_you_have_such_a_fancy_dog' - ir['public_body'].should == 'tgq' - ir['user'].should == 'bob_smith' + ir['public_body']['url_name'].should == 'tgq' + ir['user']['url_name'].should == 'bob_smith' end end |