BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+22
-11
No files found.
spec/features/projects/pipelines/pipelines_spec.rb
View file @
e83ae21d
...
...
@@ -7,6 +7,8 @@ describe 'Pipelines', :feature, :js do
include
WaitForAjax
let
(
:project
)
{
create
(
:empty_project
)
}
context
'when user is logged in'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
...
...
@@ -39,17 +41,6 @@ describe 'Pipelines', :feature, :js do
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
let!
(
:build
)
do
create
(
:ci_build
,
pipeline:
pipeline
,
...
...
@@ -316,6 +307,26 @@ describe 'Pipelines', :feature, :js do
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
)
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