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
2b00c91a
Commit
2b00c91a
authored
Jan 05, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix jobs cache reset functional spec
parent
b27b1e60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+3
-5
No files found.
spec/features/projects/pipelines/pipelines_spec.rb
View file @
2b00c91a
...
...
@@ -551,7 +551,7 @@ describe 'Pipelines', :js do
before
do
create
(
:ci_empty_pipeline
,
status:
'success'
,
project:
project
,
sha:
project
.
commit
.
id
,
ref:
'master'
)
project
.
team
<<
[
user
,
:master
]
project
.
add_master
(
user
)
visit
project_pipelines_path
(
project
)
end
...
...
@@ -560,22 +560,20 @@ describe 'Pipelines', :js do
end
describe
'user clicks the button'
do
subject
{
click_link
'Clear runner caches'
}
context
'when project already has jobs_cache_index'
do
before
do
project
.
update_attributes
(
jobs_cache_index:
1
)
end
it
'increments jobs_cache_index'
do
expect
{
subject
}.
to
change
{
project
.
reload
.
jobs_cache_index
}.
by
(
1
)
click_link
'Clear runner caches'
expect
(
page
.
find
(
'.flash-notice'
)).
to
have_content
'Project cache successfully reset.'
end
end
context
'when project does not have jobs_cache_index'
do
it
'sets jobs_cache_index to 1'
do
expect
{
subject
}.
to
change
{
project
.
reload
.
jobs_cache_index
}.
from
(
nil
).
to
(
1
)
click_link
'Clear runner caches'
expect
(
page
.
find
(
'.flash-notice'
)).
to
have_content
'Project cache successfully reset.'
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