replace deprecated stub syntax in export user spec
This commit is contained in:
parent
7a741c6dce
commit
678033fa23
1 changed files with 2 additions and 2 deletions
|
|
@ -12,13 +12,13 @@ describe Workers::ExportUser do
|
|||
end
|
||||
|
||||
it 'sends a success message when the export is successful' do
|
||||
alice.stub(:export).and_return(OpenStruct.new)
|
||||
allow(alice).to receive(:export).and_return(OpenStruct.new)
|
||||
expect(ExportMailer).to receive(:export_complete_for).with(alice).and_call_original
|
||||
Workers::ExportUser.new.perform(alice.id)
|
||||
end
|
||||
|
||||
it 'sends a failure message when the export fails' do
|
||||
alice.stub(:export).and_return(nil)
|
||||
allow(alice).to receive(:export).and_return(nil)
|
||||
expect(alice).to receive(:perform_export!).and_return(false)
|
||||
expect(ExportMailer).to receive(:export_failure_for).with(alice).and_call_original
|
||||
Workers::ExportUser.new.perform(alice.id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue