spec/services/hyrax/workflow/deposited_notification_spec.rb in hyrax-1.0.0.rc1 vs spec/services/hyrax/workflow/deposited_notification_spec.rb in hyrax-1.0.0.rc2

- old
+ new

@@ -14,20 +14,20 @@ it 'sends a message to all users' do expect(approver).to receive(:send_message) .with(anything, "Test title (<a href=\"/concern/generic_works/#{work.id}\">#{work.id}</a>) " \ "was approved by #{approver.user_key}. A pleasant read", - anything).once.and_call_original + anything).exactly(3).times.and_call_original expect { described_class.send_notification(entity: entity, user: approver, comment: comment, recipients: recipients) } .to change { depositor.mailbox.inbox.count }.by(1) .and change { to_user.mailbox.inbox.count }.by(1) .and change { cc_user.mailbox.inbox.count }.by(1) end context 'without carbon-copied users' do let(:recipients) { { 'to' => [to_user] } } it 'sends a message to the to user(s)' do - expect(approver).to receive(:send_message).once.and_call_original + expect(approver).to receive(:send_message).exactly(2).times.and_call_original expect { described_class.send_notification(entity: entity, user: approver, comment: comment, recipients: recipients) } .to change { depositor.mailbox.inbox.count }.by(1) .and change { to_user.mailbox.inbox.count }.by(1) end end