diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-12-05 21:01:38 +0200 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-12-05 22:34:37 +0200 |
commit | 4e0a0d093d7a4290a59523238990bf96b1b89313 (patch) | |
tree | 6f7046f22abb981b32a0a57f46aac8055cfe2158 /spec | |
parent | 5fedc46343d054df28ce81a320f33d1d43d02bc8 (diff) | |
download | gitlab-ce-4e0a0d093d7a4290a59523238990bf96b1b89313.tar.gz |
Authorize users into imported GitLab projectfix/authorize-users-into-imported-gitlab-project
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/import_export/members_mapper_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/lib/gitlab/import_export/members_mapper_spec.rb b/spec/lib/gitlab/import_export/members_mapper_spec.rb index 770e8b0c2f4..1cb02f8e318 100644 --- a/spec/lib/gitlab/import_export/members_mapper_spec.rb +++ b/spec/lib/gitlab/import_export/members_mapper_spec.rb @@ -2,9 +2,9 @@ require 'spec_helper' describe Gitlab::ImportExport::MembersMapper, services: true do describe 'map members' do - let(:user) { create(:user) } + let(:user) { create(:user, authorized_projects_populated: true) } let(:project) { create(:project, :public, name: 'searchable_project') } - let(:user2) { create(:user) } + let(:user2) { create(:user, authorized_projects_populated: true) } let(:exported_user_id) { 99 } let(:exported_members) do [{ @@ -67,5 +67,12 @@ describe Gitlab::ImportExport::MembersMapper, services: true do expect(ProjectMember.find_by_invite_email('invite@test.com')).not_to be_nil end + + it 'authorizes the users to the project' do + members_mapper.map + + expect(user.authorized_project?(project)).to be true + expect(user2.authorized_project?(project)).to be true + end end end |