aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-04 11:53:36 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-05-04 11:53:36 +0100
commitb0b1aebb371211e0deb5e9eac600817e90f83301 (patch)
tree833edab5fbea766670b9e707045ebae69f32bd59 /spec/controllers/request_controller_spec.rb
parentf3069a3ea4e1209115334f6455c20ed6802fbd57 (diff)
Don't ever create more than one entry for each URL that we want Varnish to purge.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index c79ddab36..cfd11a2ca 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -166,6 +166,16 @@ describe RequestController, "when changing things that appear on the request pag
ir.save!
PurgeRequest.all().first.model_id.should == ir.id
end
+ it "should not create more than one entry for any given resourcce" do
+ ir = info_requests(:fancy_dog_request)
+ ir.prominence = 'hidden'
+ ir.save!
+ PurgeRequest.all().count.should == 1
+ ir = info_requests(:fancy_dog_request)
+ ir.prominence = 'hidden'
+ ir.save!
+ PurgeRequest.all().count.should == 1
+ end
end
describe RequestController, "when showing one request" do