Commit 7cc19cd5 authored by Robert Speicher's avatar Robert Speicher

Fix a spec failure dependent on load order

We were incorrectly stubbing `Issues::MoveService#execute`. This only
caused a failure when another spec caused it to be autoloaded --
`spec/controllers/projects/issues_controller_spec.rb` in this case.
parent f0777fbb
...@@ -519,7 +519,7 @@ describe Issues::UpdateService, :mailer do ...@@ -519,7 +519,7 @@ describe Issues::UpdateService, :mailer do
end end
it 'calls the move service with the proper issue and project' do it 'calls the move service with the proper issue and project' do
move_stub = class_double("Issues::MoveService").as_stubbed_const move_stub = instance_double(Issues::MoveService)
allow(Issues::MoveService).to receive(:new).and_return(move_stub) allow(Issues::MoveService).to receive(:new).and_return(move_stub)
allow(move_stub).to receive(:execute).with(issue, target_project).and_return(issue) allow(move_stub).to receive(:execute).with(issue, target_project).and_return(issue)
......
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