aboutsummaryrefslogtreecommitdiffstats
path: root/spec/mailers
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-25 16:17:03 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-25 16:17:03 +1100
commit060d9fe70a1de0ba9aa592d25d6e7352114aa431 (patch)
treeee1c9485ffce0e7aa956af0133c616651e2ff8fb /spec/mailers
parentd09758c79fff462906b48dda6601ced25a8865da (diff)
Inline method InfoRequest.full_search
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/track_mailer_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/mailers/track_mailer_spec.rb b/spec/mailers/track_mailer_spec.rb
index 07f0e073e..346aa79c3 100644
--- a/spec/mailers/track_mailer_spec.rb
+++ b/spec/mailers/track_mailer_spec.rb
@@ -69,11 +69,15 @@ describe TrackMailer do
@xapian_search = mock('xapian search', :results => [])
@found_event = mock_model(InfoRequestEvent, :described_at => @track_thing.created_at + 1.day)
@search_result = {:model => @found_event}
- InfoRequest.stub!(:full_search).and_return(@xapian_search)
+ ActsAsXapian::Search.stub!(:new).and_return(@xapian_search)
end
it 'should ask for the events returned by the tracking query' do
- InfoRequest.should_receive(:full_search).with([InfoRequestEvent], 'test query', 'described_at', true, nil, 100, 1).and_return(@xapian_search)
+ ActsAsXapian::Search.should_receive(:new).with([InfoRequestEvent], 'test query',
+ :sort_by_prefix => 'described_at',
+ :sort_by_ascending => true,
+ :collapse_by_prefix => nil,
+ :limit => 100).and_return(@xapian_search)
TrackMailer.alert_tracks
end