Commit e738b80a authored by James Lopez's avatar James Lopez

more spec fixes

parent 9cc7764a
...@@ -37,7 +37,7 @@ describe Users::UpdateService do ...@@ -37,7 +37,7 @@ describe Users::UpdateService do
describe '#execute!' do describe '#execute!' do
it 'updates the name' do it 'updates the name' do
service = described_class.new(user, name: 'New Name') service = described_class.new(user, user, name: 'New Name')
expect(service).not_to receive(:notify_new_user) expect(service).not_to receive(:notify_new_user)
result = service.execute! result = service.execute!
...@@ -55,7 +55,7 @@ describe Users::UpdateService do ...@@ -55,7 +55,7 @@ describe Users::UpdateService do
it 'fires system hooks when a new user is saved' do it 'fires system hooks when a new user is saved' do
system_hook_service = spy(:system_hook_service) system_hook_service = spy(:system_hook_service)
user = build(:user) user = build(:user)
service = described_class.new(user, name: 'John Doe') service = described_class.new(user, user, name: 'John Doe')
expect(service).to receive(:notify_new_user).and_call_original expect(service).to receive(:notify_new_user).and_call_original
expect(service).to receive(:system_hook_service).and_return(system_hook_service) expect(service).to receive(:system_hook_service).and_return(system_hook_service)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment