Commit bd624741 authored by Kerri Miller's avatar Kerri Miller

Remove 2nd stub expectation of #last_diff_file

It looks to be a stub/mock rather than strictly an expectation of the
system, so dropping this to only a single invocation expected, as we've
removed one of the two places #last_diff_file would be invoked.
parent fb3d40cb
...@@ -96,7 +96,7 @@ describe Suggestions::CreateService do ...@@ -96,7 +96,7 @@ describe Suggestions::CreateService do
it 'creates no suggestion when diff file is not found' do it 'creates no suggestion when diff file is not found' do
expect_next_instance_of(DiffNote) do |diff_note| expect_next_instance_of(DiffNote) do |diff_note|
expect(diff_note).to receive(:latest_diff_file).twice { nil } expect(diff_note).to receive(:latest_diff_file).once { nil }
end end
expect { subject.execute }.not_to change(Suggestion, :count) expect { subject.execute }.not_to change(Suggestion, :count)
......
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