diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-11-21 16:36:40 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-11-23 13:59:13 +0300 |
commit | 747959a832bddcdffba3e7c687b66904e8c6dbf9 (patch) | |
tree | e11859d359e2ec8009095ffbdd8938220905c130 /spec | |
parent | 0f3c3a1c57beb8269f97e408f19e76ba77aac99c (diff) |
Update ProjectTeam#max_member_access_for_user_ids to use project authorizations
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 2 | ||||
-rw-r--r-- | spec/models/project_team_spec.rb | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index fe3c39e38db..7e00e214c6e 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -186,6 +186,8 @@ project: - environments - deployments - project_feature +- authorized_users +- project_authorizations award_emoji: - awardable - user diff --git a/spec/models/project_team_spec.rb b/spec/models/project_team_spec.rb index 573da5e50d4..700776be931 100644 --- a/spec/models/project_team_spec.rb +++ b/spec/models/project_team_spec.rb @@ -37,7 +37,7 @@ describe ProjectTeam, models: true do context 'group project' do let(:group) { create(:group) } - let(:project) { create(:empty_project, group: group) } + let!(:project) { create(:empty_project, group: group) } before do group.add_master(master) @@ -178,9 +178,9 @@ describe ProjectTeam, models: true do it 'returns Master role' do user = create(:user) group = create(:group) - group.add_master(user) + project = create(:empty_project, namespace: group) - project = build_stubbed(:empty_project, namespace: group) + group.add_master(user) expect(project.team.human_max_access(user.id)).to eq 'Master' end @@ -188,9 +188,9 @@ describe ProjectTeam, models: true do it 'returns Owner role' do user = create(:user) group = create(:group) - group.add_owner(user) + project = create(:empty_project, namespace: group) - project = build_stubbed(:empty_project, namespace: group) + group.add_owner(user) expect(project.team.human_max_access(user.id)).to eq 'Owner' end @@ -244,7 +244,7 @@ describe ProjectTeam, models: true do context 'group project' do let(:group) { create(:group, :access_requestable) } - let(:project) { create(:empty_project, group: group) } + let!(:project) { create(:empty_project, group: group) } before do group.add_master(master) |