From d8f6d38d39868426902ffbad9c232b7748a4288f Mon Sep 17 00:00:00 2001 From: randx Date: Wed, 12 Sep 2012 09:05:12 +0300 Subject: [PATCH] Fix observer test --- spec/observers/user_observer_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/observers/user_observer_spec.rb b/spec/observers/user_observer_spec.rb index 23dac98b..0420a250 100644 --- a/spec/observers/user_observer_spec.rb +++ b/spec/observers/user_observer_spec.rb @@ -13,7 +13,7 @@ describe UserObserver do end context 'when a new user is created' do - let(:user) { double(:user, id: 42, password: 'P@ssword!') } + let(:user) { double(:user, id: 42, password: 'P@ssword!', name: 'John', email: 'u@mail.local') } let(:notification) { double :notification } it 'sends an email' do @@ -22,5 +22,10 @@ describe UserObserver do subject.after_create(user) end + + it 'trigger logger' do + Gitlab::AppLogger.should_receive(:info) + subject.after_create(user) + end end end