summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-01-20 14:37:52 +0100
committerJames Lopez <james@jameslopez.es>2017-01-20 14:37:52 +0100
commite8396d8e734756be0a1460e83ed010025082e933 (patch)
tree4daaae84405f6a92fc9409692568b68f278d4a15 /spec/lib
parente8a9682bc98bd5e50ca52b39891cf3f7945b2300 (diff)
downloadgitlab-ce-e8396d8e734756be0a1460e83ed010025082e933.tar.gz
fix member mapper specfix/import-users
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/import_export/members_mapper_spec.rb25
1 files changed, 1 insertions, 24 deletions
diff --git a/spec/lib/gitlab/import_export/members_mapper_spec.rb b/spec/lib/gitlab/import_export/members_mapper_spec.rb
index 39e6dad5abe..b069696b5c7 100644
--- a/spec/lib/gitlab/import_export/members_mapper_spec.rb
+++ b/spec/lib/gitlab/import_export/members_mapper_spec.rb
@@ -49,8 +49,6 @@ describe Gitlab::ImportExport::MembersMapper, services: true do
end
it 'includes the exported user ID in the map' do
- members_mapper.map[-1]
-
expect(members_mapper.map.keys).to include(exported_user_id)
end
@@ -88,28 +86,7 @@ describe Gitlab::ImportExport::MembersMapper, services: true do
end
context 'chooses the one with an email first' do
- before do
- exported_members << {
- "id" => 2,
- "access_level" => 40,
- "source_id" => 14,
- "source_type" => "Project",
- "user_id" => 19,
- "notification_level" => 3,
- "created_at" => "2016-03-11T10:21:44.822Z",
- "updated_at" => "2016-03-11T10:21:44.822Z",
- "created_by_id" => nil,
- "invite_email" => nil,
- "invite_token" => nil,
- "invite_accepted_at" => nil,
- "user" =>
- {
- "id" => exported_user_id,
- "email" => 'test@email.com',
- "username" => user2.username
- }
- }
- end
+ let(:user3) { create(:user, username: 'test') }
it 'maps the project member that has a matching email first' do
expect(members_mapper.map[exported_user_id]).to eq(user2.id)