aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/view_request_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-12-21 16:46:29 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-12-21 16:46:29 +0000
commit7ed887f0989425d9e412890800df05637b08c025 (patch)
tree6f1d3fb4d215f069995634907f2bb32e9220ac22 /spec/integration/view_request_spec.rb
parent21f1855560daa7992b058403938655ad229e0f71 (diff)
parent37b2fb482d31f77865bb889c049450d72876df92 (diff)
Merge branch 'cache-foi-attachments-seb'
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
+