Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
f3ad4ecb
Commit
f3ad4ecb
authored
Apr 01, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CE] Reduce diff with EE in spec/models/project_team_spec.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
0f369d14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
spec/models/project_team_spec.rb
spec/models/project_team_spec.rb
+24
-0
No files found.
spec/models/project_team_spec.rb
View file @
f3ad4ecb
...
@@ -195,6 +195,30 @@ describe ProjectTeam do
...
@@ -195,6 +195,30 @@ describe ProjectTeam do
end
end
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
describe
"#human_max_access"
do
it
'returns Maintainer role'
do
it
'returns Maintainer role'
do
user
=
create
(
:user
)
user
=
create
(
:user
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment