diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-01 19:20:31 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-02 10:21:35 +0200 |
commit | f3ad4ecb73f66487191160505578d236d9361d18 (patch) | |
tree | 920caa17bab5dd5563178339044226f23e285aea /spec/models | |
parent | 0f369d145b568fc1e1b6034b42a4b3a6b3652d43 (diff) | |
download | gitlab-ce-f3ad4ecb73f66487191160505578d236d9361d18.tar.gz |
[CE] Reduce diff with EE in spec/models/project_team_spec.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_team_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/models/project_team_spec.rb b/spec/models/project_team_spec.rb index a2d4fad9292..77c88a04cde 100644 --- a/spec/models/project_team_spec.rb +++ b/spec/models/project_team_spec.rb @@ -195,6 +195,30 @@ describe ProjectTeam do end end + describe '#add_users' do + let(:user1) { create(:user) } + let(:user2) { create(:user) } + let(:project) { create(:project) } + + it 'add the given users to the team' do + project.team.add_users([user1, user2], :reporter) + + expect(project.team.reporter?(user1)).to be(true) + expect(project.team.reporter?(user2)).to be(true) + end + end + + describe '#add_user' do + let(:user) { create(:user) } + let(:project) { create(:project) } + + it 'add the given user to the team' do + project.team.add_user(user, :reporter) + + expect(project.team.reporter?(user)).to be(true) + end + end + describe "#human_max_access" do it 'returns Maintainer role' do user = create(:user) |