blob: 42b67a0941a3e2fb3844e221a9f07de69b1964c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Projects::ImportExport::AfterImportMergeRequestsWorker, feature_category: :importers do
let_it_be(:project) { create(:project) }
let_it_be(:merge_requests) { project.merge_requests }
let(:worker) { described_class.new }
describe '#perform' do
it 'sets the latest merge request diff ids' do
expect(project.class).to receive(:find_by_id).and_return(project)
expect(merge_requests).to receive(:set_latest_merge_request_diff_ids!)
worker.perform(project.id)
end
it_behaves_like 'an idempotent worker' do
let(:job_args) { [project.id] }
end
end
end
|