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.
This commit is contained in:
Kerri Miller 2019-06-04 07:50:41 -07:00
parent fb3d40cb61
commit bd624741a1

View file

@ -96,7 +96,7 @@ describe Suggestions::CreateService do
it 'creates no suggestion when diff file is not found' do
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
expect { subject.execute }.not_to change(Suggestion, :count)