From 7b85b81d1076169a9b01c301545f0f9192540f97 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Wed, 20 Oct 2010 15:58:58 +0100 Subject: Return more info in request JSON response. --- spec/controllers/request_controller_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/controllers/request_controller_spec.rb') 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 -- cgit v1.2.3