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
ac531c0e
Commit
ac531c0e
authored
Feb 24, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test against default to '0', it should not set
parent
83418ad8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+22
-8
No files found.
spec/requests/ci/api/builds_spec.rb
View file @
ac531c0e
...
@@ -668,14 +668,28 @@ describe Ci::API::Builds do
...
@@ -668,14 +668,28 @@ describe Ci::API::Builds do
end
end
context
'with application default'
do
context
'with application default'
do
let
(
:default_artifacts_expire_in
)
{
'5 days'
}
context
'default to 5 days'
do
let
(
:default_artifacts_expire_in
)
{
'5 days'
}
it
'sets to application default'
do
build
.
reload
it
'sets to application default'
do
expect
(
response
).
to
have_http_status
(
201
)
build
.
reload
expect
(
json_response
[
'artifacts_expire_at'
]).
not_to
be_empty
expect
(
response
).
to
have_http_status
(
201
)
expect
(
build
.
artifacts_expire_at
).
expect
(
json_response
[
'artifacts_expire_at'
])
to
be_within
(
5
.
minutes
).
of
(
5
.
days
.
from_now
)
.
not_to
be_empty
expect
(
build
.
artifacts_expire_at
)
.
to
be_within
(
5
.
minutes
).
of
(
5
.
days
.
from_now
)
end
end
context
'default to 0'
do
let
(
:default_artifacts_expire_in
)
{
'0'
}
it
'does not set expire_in'
do
build
.
reload
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
[
'artifacts_expire_at'
]).
to
be_nil
expect
(
build
.
artifacts_expire_at
).
to
be_nil
end
end
end
end
end
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