aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-29 19:12:01 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-29 19:12:01 +0000
commitf6cd280bbfafa2151ededb8280407686fb73e8a7 (patch)
tree068c9b8e2723efb7fe10c9602ea494ccc578e1f5 /spec/controllers/general_controller_spec.rb
parentba003a16e51b0316233157893b6572aa01616c77 (diff)
Test duplicate requests are coalesced
Test that duplicate requests are coalesced on the front page.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 6c9f8b88d..9a5421a78 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -126,6 +126,11 @@ describe GeneralController, "when searching" do
get :frontpage
assigns[:request_events].first.info_request.should == info_requests(:another_boring_request)
end
+
+ it 'should coalesce duplicate requests' do
+ get :frontpage
+ assigns[:request_events].map(&:info_request).select{|x|x.url_title =~ /^spam/}.length.should == 1
+ end
end
describe 'when using xapian search' do