diff options
author | James Lopez <james@gitlab.com> | 2019-05-23 16:10:38 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-05-23 16:10:38 +0300 |
commit | 30d915110f94c75b464e1cee5e51a16fbd72fabd (patch) | |
tree | 647daa7788875bea3abf63439b940e8e736f946c /spec/lib | |
parent | bd1ef521732715310dedb2cb2071a589432444ea (diff) |
Fix issue importing members with owner access
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/import_export/members_mapper_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/members_mapper_spec.rb b/spec/lib/gitlab/import_export/members_mapper_spec.rb index 67e4c289906..c663cf42a83 100644 --- a/spec/lib/gitlab/import_export/members_mapper_spec.rb +++ b/spec/lib/gitlab/import_export/members_mapper_spec.rb @@ -73,6 +73,13 @@ describe Gitlab::ImportExport::MembersMapper do expect(user2.authorized_project?(project)).to be true end + it 'maps an owner as a maintainer' do + exported_members.first['access_level'] = ProjectMember::OWNER + + expect(members_mapper.map[exported_user_id]).to eq(user2.id) + expect(ProjectMember.find_by_user_id(user2.id).access_level).to eq(ProjectMember::MAINTAINER) + end + context 'user is not an admin' do let(:user) { create(:user) } |