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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
90112f57
Commit
90112f57
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace `is_member_of` with `member_of?`
parent
81061aef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
.rubocop_todo.yml
.rubocop_todo.yml
+3
-3
features/steps/shared/group.rb
features/steps/shared/group.rb
+7
-7
No files found.
.rubocop_todo.yml
View file @
90112f57
...
...
@@ -244,11 +244,11 @@ Style/PerlBackrefs:
# NameWhitelist: is_a?
Style/PredicateName
:
Enabled
:
true
Exclude
:
-
'
features/*'
#
Exclude:
#
- 'features/*'
# NamePrefix: is_
NamePrefixBlacklist
:
is_
NameWhitelist
:
ha
s_n_stars
NameWhitelist
:
ha
ve_visible_content
# Offense count: 58
# Cop supports --auto-correct.
...
...
features/steps/shared/group.rb
View file @
90112f57
...
...
@@ -2,27 +2,27 @@ module SharedGroup
include
Spinach
::
DSL
step
'current user is developer of group "Owned"'
do
is_member_of
(
current_user
.
name
,
"Owned"
,
Gitlab
::
Access
::
DEVELOPER
)
member_of?
(
current_user
.
name
,
"Owned"
,
Gitlab
::
Access
::
DEVELOPER
)
end
step
'"John Doe" is owner of group "Owned"'
do
is_member_of
(
"John Doe"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
member_of?
(
"John Doe"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
end
step
'"John Doe" is guest of group "Guest"'
do
is_member_of
(
"John Doe"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
member_of?
(
"John Doe"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
end
step
'"Mary Jane" is owner of group "Owned"'
do
is_member_of
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
member_of?
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
OWNER
)
end
step
'"Mary Jane" is guest of group "Owned"'
do
is_member_of
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
GUEST
)
member_of?
(
"Mary Jane"
,
"Owned"
,
Gitlab
::
Access
::
GUEST
)
end
step
'"Mary Jane" is guest of group "Guest"'
do
is_member_of
(
"Mary Jane"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
member_of?
(
"Mary Jane"
,
"Guest"
,
Gitlab
::
Access
::
GUEST
)
end
step
'I should see group "TestGroup"'
do
...
...
@@ -35,7 +35,7 @@ module SharedGroup
protected
def
is_member_of
(
username
,
groupname
,
role
)
def
member_of?
(
username
,
groupname
,
role
)
@project_count
||=
0
user
=
User
.
find_by
(
name:
username
)
||
create
(
:user
,
name:
username
)
group
=
Group
.
find_by
(
name:
groupname
)
||
create
(
:group
,
name:
groupname
)
...
...
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