-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: Gemfile Gemfile.lock
- Loading branch information
Showing
29 changed files
with
85 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
let(:user) { FactoryGirl.create(:user, email: '[email protected]', movement: movement) } | ||
|
||
def expect_user_to_be_permanently_unsubscribed(&block) | ||
UserActivityEvent.should_receive(:unsubscribed!).with(user, nil) | ||
expect(UserActivityEvent).to receive(:unsubscribed!).with(user, nil) | ||
|
||
yield | ||
|
||
|
@@ -17,7 +17,7 @@ def expect_user_to_be_permanently_unsubscribed(&block) | |
describe '#event_handler' do | ||
|
||
it 'should return 200 in order to prevent sendgrid from retrying' do | ||
Delayed::Job.should_receive(:enqueue) { raise "some error" } | ||
expect(Delayed::Job).to receive(:enqueue) { raise "some error" } | ||
|
||
post :event_handler, movement_id: movement.id, '_json' => [{}] | ||
|
||
|
@@ -36,7 +36,7 @@ def dropped_event_params(email_address, reason) | |
context 'Unsubscribed Address' do | ||
|
||
it 'should unsubscribe the user' do | ||
UserActivityEvent.should_receive(:unsubscribed!).with(user, nil) | ||
expect(UserActivityEvent).to receive(:unsubscribed!).with(user, nil) | ||
|
||
post :event_handler, movement_id: movement.id, '_json' => dropped_event_params(user.email, 'Unsubscribed Address') | ||
|
||
|
@@ -96,7 +96,7 @@ def dropped_event_params(email_address, reason) | |
|
||
it 'should unsubscribe the user and associate the event with an email' do | ||
email = create(:email) | ||
UserActivityEvent.should_receive(:unsubscribed!).with(user, email) | ||
expect(UserActivityEvent).to receive(:unsubscribed!).with(user, email) | ||
|
||
post :event_handler, movement_id: movement.id, '_json' => [{'email' => user.email, | ||
'event' => 'unsubscribe', | ||
|
@@ -114,8 +114,8 @@ def dropped_event_params(email_address, reason) | |
|
||
it 'should permanently unsubscribe the member, record a spam event, and associate both events with an email' do | ||
email = create(:email) | ||
UserActivityEvent.should_receive(:email_spammed!).with(user, email) | ||
UserActivityEvent.should_receive(:unsubscribed!).with(user, email) | ||
expect(UserActivityEvent).to receive(:email_spammed!).with(user, email) | ||
expect(UserActivityEvent).to receive(:unsubscribed!).with(user, email) | ||
|
||
post :event_handler, movement_id: movement.id, '_json' => [{'email' => user.email, | ||
'event' => 'spamreport', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.