sidekiq with green tests
This commit is contained in:
parent
71bd956866
commit
9773ccc451
14 changed files with 48 additions and 68 deletions
|
@ -10,24 +10,14 @@ describe UserObserver do
|
|||
end
|
||||
|
||||
context 'when a new user is created' do
|
||||
let(:user) { double(:user, id: 42,
|
||||
password: 'P@ssword!',
|
||||
name: 'John',
|
||||
email: 'u@mail.local',
|
||||
username: 'root',
|
||||
create_namespace: true) }
|
||||
let(:notification) { double :notification }
|
||||
|
||||
it 'sends an email' do
|
||||
notification.should_receive(:deliver)
|
||||
Notify.should_receive(:new_user_email).with(user.id, user.password).and_return(notification)
|
||||
|
||||
subject.after_create(user)
|
||||
Notify.should_receive(:new_user_email)
|
||||
create(:user)
|
||||
end
|
||||
|
||||
it 'trigger logger' do
|
||||
Gitlab::AppLogger.should_receive(:info)
|
||||
subject.after_create(user)
|
||||
create(:user)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue