Commit 1ec357f0 authored by Qingyu Zhao's avatar Qingyu Zhao

Update rspec per more review comment

parent 683cffed
...@@ -97,16 +97,10 @@ describe Gitlab::ImportExport::ImportFailureService do ...@@ -97,16 +97,10 @@ describe Gitlab::ImportExport::ImportFailureService do
context 'when exception is not retriable' do context 'when exception is not retriable' do
let(:exception) { StandardError.new } let(:exception) { StandardError.new }
before do it 'raise the exception', :aggregate_failures do
allow(label).to receive(:save!).and_raise(exception) expect(label).to receive(:save!).once.and_raise(exception)
end expect(subject).not_to receive(:log_import_failure)
expect { perform_retry }.to raise_exception(exception)
it 'raise the exception' do
aggregate_failures do
expect(label).to receive(:save!).once
expect(subject).not_to receive(:log_import_failure)
expect { perform_retry }.to raise_exception(exception)
end
end end
end end
end end
......
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