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
f7c5c686
Commit
f7c5c686
authored
Jul 21, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `empty_project` where possible in spec/features/profiles
parent
0853daca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/features/profiles/account_spec.rb
spec/features/profiles/account_spec.rb
+3
-3
No files found.
spec/features/profiles/account_spec.rb
View file @
f7c5c686
...
@@ -27,7 +27,7 @@ feature 'Profile > Account' do
...
@@ -27,7 +27,7 @@ feature 'Profile > Account' do
end
end
context
'with a project'
do
context
'with a project'
do
given!
(
:project
)
{
create
(
:
project
,
namespace:
user
.
namespace
,
path:
'project'
)
}
given!
(
:project
)
{
create
(
:
empty_project
,
namespace:
user
.
namespace
)
}
given
(
:new_project_path
)
{
"/
#{
new_username
}
/
#{
project
.
path
}
"
}
given
(
:new_project_path
)
{
"/
#{
new_username
}
/
#{
project
.
path
}
"
}
given
(
:old_project_path
)
{
"/
#{
user
.
username
}
/
#{
project
.
path
}
"
}
given
(
:old_project_path
)
{
"/
#{
user
.
username
}
/
#{
project
.
path
}
"
}
...
@@ -43,14 +43,14 @@ feature 'Profile > Account' do
...
@@ -43,14 +43,14 @@ feature 'Profile > Account' do
update_username
(
new_username
)
update_username
(
new_username
)
visit
new_project_path
visit
new_project_path
expect
(
current_path
).
to
eq
(
new_project_path
)
expect
(
current_path
).
to
eq
(
new_project_path
)
expect
(
find
(
'h1.
project-title'
)).
to
have_content
(
project
.
name
)
expect
(
find
(
'h1.
title'
)).
to
have_content
(
project
.
path
)
end
end
scenario
'the old project path redirects to the new path'
do
scenario
'the old project path redirects to the new path'
do
update_username
(
new_username
)
update_username
(
new_username
)
visit
old_project_path
visit
old_project_path
expect
(
current_path
).
to
eq
(
new_project_path
)
expect
(
current_path
).
to
eq
(
new_project_path
)
expect
(
find
(
'h1.
project-title'
)).
to
have_content
(
project
.
name
)
expect
(
find
(
'h1.
title'
)).
to
have_content
(
project
.
path
)
end
end
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