diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-29 19:12:01 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-29 19:12:01 +0000 |
commit | f6cd280bbfafa2151ededb8280407686fb73e8a7 (patch) | |
tree | 068c9b8e2723efb7fe10c9602ea494ccc578e1f5 /spec/controllers/general_controller_spec.rb | |
parent | ba003a16e51b0316233157893b6572aa01616c77 (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.rb | 5 |
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 |