Add MembersMapper#ensure_default_user! spec
This commit is contained in:
parent
8e6af8c59f
commit
0bd54eb436
1 changed files with 10 additions and 0 deletions
|
@ -154,5 +154,15 @@ describe Gitlab::ImportExport::MembersMapper do
|
||||||
expect(members_mapper.map[exported_user_id]).to eq(user2.id)
|
expect(members_mapper.map[exported_user_id]).to eq(user2.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when importer mapping fails' do
|
||||||
|
let(:exception_message) { 'Something went wrong' }
|
||||||
|
|
||||||
|
it 'includes importer specific error message' do
|
||||||
|
expect(ProjectMember).to receive(:create!).and_raise(StandardError.new(exception_message))
|
||||||
|
|
||||||
|
expect { members_mapper.map }.to raise_error(StandardError, "Error adding importer user to project members. #{exception_message}")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue