diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-06-04 11:49:34 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-06-04 11:49:34 +0100 |
commit | f6bb0e5d33ceb5beb80f9561b77c716a04f574a2 (patch) | |
tree | 135c5ccefc742e471f4b74ddf0688aace10a70d7 /spec/mailers | |
parent | c304f25a8950f61215ef2fae1e7feb71cfbfeb56 (diff) | |
parent | 9727c7b62fd3fe7b00cfc64cb4b36ba445a3a960 (diff) |
Merge remote-tracking branch 'openaustralia_github/inline_search_method_refactor' into rails-3-develop
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/track_mailer_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/mailers/track_mailer_spec.rb b/spec/mailers/track_mailer_spec.rb index a3b849980..509d08331 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 |