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
Léo-Paul Géneau
gitlab-ce
Commits
e83ae21d
Commit
e83ae21d
authored
Jan 04, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract anonymous user context in pipelines specs
parent
6a7a31b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
226 additions
and
215 deletions
+226
-215
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+226
-215
No files found.
spec/features/projects/pipelines/pipelines_spec.rb
View file @
e83ae21d
...
@@ -7,6 +7,8 @@ describe 'Pipelines', :feature, :js do
...
@@ -7,6 +7,8 @@ describe 'Pipelines', :feature, :js do
include
WaitForAjax
include
WaitForAjax
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:project
)
{
create
(
:empty_project
)
}
context
'when user is logged in'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
before
do
...
@@ -39,17 +41,6 @@ describe 'Pipelines', :feature, :js do
...
@@ -39,17 +41,6 @@ describe 'Pipelines', :feature, :js do
end
end
end
end
context
'anonymous access'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
before
do
logout
visit_project_pipelines
end
it
{
expect
(
page
).
to
have_http_status
(
:success
)
}
end
context
'when pipeline is cancelable'
do
context
'when pipeline is cancelable'
do
let!
(
:build
)
do
let!
(
:build
)
do
create
(
:ci_build
,
pipeline:
pipeline
,
create
(
:ci_build
,
pipeline:
pipeline
,
...
@@ -316,6 +307,26 @@ describe 'Pipelines', :feature, :js do
...
@@ -316,6 +307,26 @@ describe 'Pipelines', :feature, :js do
end
end
end
end
end
end
end
context
'when user is not logged in'
do
before
do
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
end
context
'when project is public'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
it
{
expect
(
page
).
to
have_content
'No pipelines to show'
}
it
{
expect
(
page
).
to
have_http_status
(
:success
)
}
end
context
'when project is private'
do
let
(
:project
)
{
create
(
:project
,
:private
)
}
it
{
expect
(
page
).
to
have_content
'You need to sign in'
}
end
end
def
visit_project_pipelines
(
**
query
)
def
visit_project_pipelines
(
**
query
)
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
,
query
)
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
,
query
)
...
...
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