aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/view_request_spec.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-05 10:26:01 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-05 10:26:01 +0000
commit6a93d027e744bfc4ab2f8f7808ee99c770003481 (patch)
treeb8bfe4e93e2314c8c7c9b95e99a861d8fad6b05f /spec/integration/view_request_spec.rb
parent48bbe41b36402a22b808ec860c1a84673b74527f (diff)
parentb06195a428b5cb6c3e95b07c631e2f18febf05f0 (diff)
Merge branch 'release/0.5' into wdtk
Conflicts: .gitignore
Diffstat (limited to 'spec/integration/view_request_spec.rb')
-rw-r--r--spec/integration/view_request_spec.rb32
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
+