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
4de1db11
Commit
4de1db11
authored
Jul 29, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Public area spinach tests
parent
dd8f090b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
0 deletions
+53
-0
features/public/public_projects.feature
features/public/public_projects.feature
+14
-0
features/steps/public/projects_feature.rb
features/steps/public/projects_feature.rb
+35
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
No files found.
features/public/public_projects.feature
0 → 100644
View file @
4de1db11
Feature
:
Public Projects Feature
Background
:
Given
public project
"Community"
And
private project
"Enterprise"
Scenario
:
I
visit public area
When
I visit the public projects area
Then
I should see project
"Community"
And
I should not see project
"Enterprise"
Scenario
:
I
visit public project page
When
I visit public page for
"Community"
project
Then
I should see public project details
And
I should see project readme
features/steps/public/projects_feature.rb
0 → 100644
View file @
4de1db11
class
Spinach::Features::PublicProjectsFeature
<
Spinach
::
FeatureSteps
include
SharedPaths
step
'I should see project "Community"'
do
page
.
should
have_content
"Community"
end
step
'I should not see project "Enterprise"'
do
page
.
should_not
have_content
"Enterprise"
end
step
'I should see public project details'
do
page
.
should
have_content
'32 branches'
page
.
should
have_content
'16 tags'
end
step
'I should see project readme'
do
page
.
should
have_content
'README.md'
end
step
'public project "Community"'
do
create
:project_with_code
,
name:
'Community'
,
public:
true
end
step
'private project "Enterprise"'
do
create
:project
,
name:
'Enterprise'
end
private
def
project
@project
||=
Project
.
find_by_name
(
"Community"
)
end
end
features/steps/shared/paths.rb
View file @
4de1db11
...
@@ -275,6 +275,10 @@ module SharedPaths
...
@@ -275,6 +275,10 @@ module SharedPaths
visit
public_root_path
visit
public_root_path
end
end
step
'I visit public page for "Community" project'
do
visit
public_project_path
(
Project
.
find_by_name
(
"Community"
))
end
# ----------------------------------------
# ----------------------------------------
# Snippets
# Snippets
# ----------------------------------------
# ----------------------------------------
...
...
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