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
2c362688
Commit
2c362688
authored
Jun 18, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test the redirect after sign in.
parent
a1eb1ad1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
features/project/redirects.feature
features/project/redirects.feature
+6
-0
features/steps/project/redirects.rb
features/steps/project/redirects.rb
+6
-0
No files found.
features/project/redirects.feature
View file @
2c362688
...
@@ -24,3 +24,9 @@ Feature: Project Redirects
...
@@ -24,3 +24,9 @@ Feature: Project Redirects
Given
I sign in as a user
Given
I sign in as a user
When
I visit project
"Enterprise"
page
When
I visit project
"Enterprise"
page
Then
page status code should be 404
Then
page status code should be 404
Scenario
:
I
visit a public project without signing in
When
I visit project
"Community"
page
And
I should see project
"Community"
home page
And
I sign in as a user
Then
I should be redirected to
"Community"
page
features/steps/project/redirects.rb
View file @
2c362688
...
@@ -31,5 +31,11 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
...
@@ -31,5 +31,11 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
project
=
Project
.
find_by
(
name:
'Community'
)
project
=
Project
.
find_by
(
name:
'Community'
)
visit
project_path
(
project
)
+
'DoesNotExist'
visit
project_path
(
project
)
+
'DoesNotExist'
end
end
step
'I should be redirected to "Community" page'
do
project
=
Project
.
find_by
(
name:
'Community'
)
page
.
current_path
.
should
==
"/
#{
project
.
path_with_namespace
}
"
page
.
status_code
.
should
==
200
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