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
Boxiang Sun
gitlab-ce
Commits
34fefa81
Commit
34fefa81
authored
Nov 27, 2018
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport changes from spec/migrations/clean_up_for_members_spec.rb
parent
7bf26235
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
spec/migrations/clean_up_for_members_spec.rb
spec/migrations/clean_up_for_members_spec.rb
+3
-2
No files found.
spec/migrations/clean_up_for_members_spec.rb
View file @
34fefa81
...
...
@@ -3,6 +3,7 @@ require Rails.root.join('db', 'migrate', '20171216111734_clean_up_for_members.rb
describe
CleanUpForMembers
,
:migration
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:groups
)
{
table
(
:namespaces
)
}
let!
(
:group_member
)
{
create_group_member
}
let!
(
:unbinded_group_member
)
{
create_group_member
}
let!
(
:invited_group_member
)
{
create_group_member
(
true
)
}
...
...
@@ -25,7 +26,7 @@ describe CleanUpForMembers, :migration do
end
def
create_group_member
(
invited
=
false
)
fill_member
(
GroupMember
.
new
(
group:
create_group
),
invited
)
fill_member
(
GroupMember
.
new
(
source_id:
create_group
.
id
,
source_type:
'Namespace'
),
invited
)
end
def
create_project_member
(
invited
=
false
)
...
...
@@ -54,7 +55,7 @@ describe CleanUpForMembers, :migration do
def
create_group
name
=
FFaker
::
Lorem
.
characters
(
10
)
Group
.
create
(
name:
name
,
path:
name
.
downcase
.
gsub
(
/\s/
,
'_'
))
groups
.
create!
(
type:
'Group'
,
name:
name
,
path:
name
.
downcase
.
gsub
(
/\s/
,
'_'
))
end
def
create_project
...
...
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