Backport import/export spec changes from EE

This backports remaining import/export spec changes from EE to CE.
This commit is contained in:
Yorick Peterse 2019-07-22 16:23:59 +02:00
parent 7e2e48cf6e
commit 46fef6f21d
No known key found for this signature in database
GPG key ID: EDD30D2BEB691AC9
2 changed files with 7 additions and 1 deletions

View file

@ -42,6 +42,10 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
expect(saved_project_json).to include({ 'description' => 'description', 'visibility_level' => 20 }) expect(saved_project_json).to include({ 'description' => 'description', 'visibility_level' => 20 })
end end
it 'has approvals_before_merge set' do
expect(saved_project_json['approvals_before_merge']).to eq(1)
end
it 'has milestones' do it 'has milestones' do
expect(saved_project_json['milestones']).not_to be_empty expect(saved_project_json['milestones']).not_to be_empty
end end
@ -287,7 +291,8 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
issues: [issue], issues: [issue],
snippets: [snippet], snippets: [snippet],
releases: [release], releases: [release],
group: group group: group,
approvals_before_merge: 1
) )
project_label = create(:label, project: project) project_label = create(:label, project: project)
group_label = create(:group_label, group: group) group_label = create(:group_label, group: group)

View file

@ -28,6 +28,7 @@ describe Gitlab::ImportExport::RelationRenameService do
before do before do
allow(shared).to receive(:export_path).and_return(import_path) allow(shared).to receive(:export_path).and_return(import_path)
allow(ActiveSupport::JSON).to receive(:decode).and_call_original
allow(ActiveSupport::JSON).to receive(:decode).with(file_content).and_return(json_file) allow(ActiveSupport::JSON).to receive(:decode).with(file_content).and_return(json_file)
end end