diff options
author | Robin Houston <robin.houston@gmail.com> | 2011-12-30 16:49:50 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2011-12-30 16:49:50 +0000 |
commit | 5eb2396a036f3a7400957e86dad8a74482224717 (patch) | |
tree | b790f045ac8d320215f8cc67f6b084c820691441 /spec/integration/view_request_spec.rb | |
parent | d941232e838ede8ef0de20d4cb4557bc3698b510 (diff) | |
parent | 79fd89c5aec01ea035d57c5a71213202dafc778c (diff) |
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop
Diffstat (limited to 'spec/integration/view_request_spec.rb')
-rw-r--r-- | spec/integration/view_request_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/integration/view_request_spec.rb b/spec/integration/view_request_spec.rb new file mode 100644 index 000000000..cf1e4ca6c --- /dev/null +++ b/spec/integration/view_request_spec.rb @@ -0,0 +1,32 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe "When viewing requests" do + + fixtures [ + :users, + :public_bodies, + :public_body_translations, + :public_body_versions, + :info_requests, + :raw_emails, + :outgoing_messages, + :incoming_messages, + :comments, + :info_request_events, + :track_things, + ] + + before(:each) do + emails = raw_emails.clone + load_raw_emails_data(emails) + end + + it "should not make endlessly recursive JSON <link>s" do + @dog_request = info_requests(:fancy_dog_request) + get "request/#{@dog_request.url_title}?unfold=1" + response.body.should_not include("dog?unfold=1.json") + response.body.should include("dog.json?unfold=1") + end + +end + |