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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
77cfdb0a
Commit
77cfdb0a
authored
Oct 26, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for caching nil status
parent
0079fa19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
+15
-0
No files found.
spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb
View file @
77cfdb0a
...
@@ -282,6 +282,21 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
...
@@ -282,6 +282,21 @@ describe Gitlab::Cache::Ci::ProjectPipelineStatus, :clean_gitlab_redis_cache do
expect
(
pipeline_status
.
status
).
to
eq
(
status
)
expect
(
pipeline_status
.
status
).
to
eq
(
status
)
expect
(
pipeline_status
.
ref
).
to
eq
(
ref
)
expect
(
pipeline_status
.
ref
).
to
eq
(
ref
)
end
end
context
'when status is empty string'
do
before
do
Gitlab
::
Redis
::
Cache
.
with
do
|
redis
|
redis
.
mapped_hmset
(
cache_key
,
{
sha:
sha
,
status:
''
,
ref:
ref
})
end
end
it
'reads the status as nil'
do
pipeline_status
.
load_from_cache
expect
(
pipeline_status
.
status
).
to
eq
(
nil
)
end
end
end
end
describe
'#has_cache?'
do
describe
'#has_cache?'
do
...
...
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