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
Jérome Perrin
gitlab-ce
Commits
566be168
Commit
566be168
authored
Feb 22, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of hard-coded user/project/group names that could clash with DB sequences
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
d1ceb600
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+4
-4
spec/requests/openid_connect_spec.rb
spec/requests/openid_connect_spec.rb
+6
-6
No files found.
spec/features/projects_spec.rb
View file @
566be168
...
@@ -146,8 +146,8 @@ feature 'Project' do
...
@@ -146,8 +146,8 @@ feature 'Project' do
end
end
describe
'removal'
,
:js
do
describe
'removal'
,
:js
do
let
(
:user
)
{
create
(
:user
,
username:
'test'
,
name:
'test'
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
,
name:
'project1'
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
...
@@ -156,8 +156,8 @@ feature 'Project' do
...
@@ -156,8 +156,8 @@ feature 'Project' do
end
end
it
'removes a project'
do
it
'removes a project'
do
expect
{
remove_with_confirm
(
'Remove project'
,
project
.
path
)
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
expect
{
remove_with_confirm
(
'Remove project'
,
project
.
path
)
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
expect
(
page
).
to
have_content
"Project '
test / project1
' is in the process of being deleted."
expect
(
page
).
to
have_content
"Project '
#{
project
.
full_name
}
' is in the process of being deleted."
expect
(
Project
.
all
.
count
).
to
be_zero
expect
(
Project
.
all
.
count
).
to
be_zero
expect
(
project
.
issues
).
to
be_empty
expect
(
project
.
issues
).
to
be_empty
expect
(
project
.
merge_requests
).
to
be_empty
expect
(
project
.
merge_requests
).
to
be_empty
...
...
spec/requests/openid_connect_spec.rb
View file @
566be168
...
@@ -68,10 +68,10 @@ describe 'OpenID Connect requests' do
...
@@ -68,10 +68,10 @@ describe 'OpenID Connect requests' do
let!
(
:public_email
)
{
build
:email
,
email:
'public@example.com'
}
let!
(
:public_email
)
{
build
:email
,
email:
'public@example.com'
}
let!
(
:private_email
)
{
build
:email
,
email:
'private@example.com'
}
let!
(
:private_email
)
{
build
:email
,
email:
'private@example.com'
}
let!
(
:group1
)
{
create
:group
,
path:
'group1'
}
let!
(
:group1
)
{
create
:group
}
let!
(
:group2
)
{
create
:group
,
path:
'group2'
}
let!
(
:group2
)
{
create
:group
}
let!
(
:group3
)
{
create
:group
,
pa
th:
'group3'
,
pa
rent:
group2
}
let!
(
:group3
)
{
create
:group
,
parent:
group2
}
let!
(
:group4
)
{
create
:group
,
pa
th:
'group4'
,
pa
rent:
group3
}
let!
(
:group4
)
{
create
:group
,
parent:
group3
}
before
do
before
do
group1
.
add_user
(
user
,
GroupMember
::
OWNER
)
group1
.
add_user
(
user
,
GroupMember
::
OWNER
)
...
@@ -93,8 +93,8 @@ describe 'OpenID Connect requests' do
...
@@ -93,8 +93,8 @@ describe 'OpenID Connect requests' do
'groups'
=>
anything
'groups'
=>
anything
}))
}))
expected_groups
=
%w[group1 group2/group3
]
expected_groups
=
[
group1
.
full_path
,
group3
.
full_path
]
expected_groups
<<
'group2/group3/group4'
if
Group
.
supports_nested_groups?
expected_groups
<<
group4
.
full_path
if
Group
.
supports_nested_groups?
expect
(
json_response
[
'groups'
]).
to
match_array
(
expected_groups
)
expect
(
json_response
[
'groups'
]).
to
match_array
(
expected_groups
)
end
end
end
end
...
...
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