29cfd33d94
Emails are used to associate commits with users. The emails are not verified and don't have to be valid email addresses. They are assigned on a first come, first serve basis. Notifications are sent when an email is added.
17 lines
388 B
Ruby
17 lines
388 B
Ruby
require 'spec_helper'
|
|
|
|
describe EmailObserver do
|
|
let(:email) { create(:email) }
|
|
|
|
before { subject.stub(notification: double('NotificationService').as_null_object) }
|
|
|
|
subject { EmailObserver.instance }
|
|
|
|
describe '#after_create' do
|
|
it 'trigger notification to send emails' do
|
|
subject.should_receive(:notification)
|
|
|
|
subject.after_create(email)
|
|
end
|
|
end
|
|
end
|