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
67fb91d4
Commit
67fb91d4
authored
Dec 11, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport a spec fix done in EE (
5dbecb8e
) to CE
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
980df271
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+8
-18
No files found.
spec/models/ci/build_spec.rb
View file @
67fb91d4
...
@@ -132,11 +132,9 @@ describe Ci::Build do
...
@@ -132,11 +132,9 @@ describe Ci::Build do
end
end
describe
'#artifacts?'
do
describe
'#artifacts?'
do
context
'when new artifacts are used'
do
subject
{
build
.
artifacts?
}
let
(
:build
)
{
create
(
:ci_build
,
:artifacts
)
}
subject
{
build
.
artifacts?
}
context
'when new artifacts are used'
do
context
'artifacts archive does not exist'
do
context
'artifacts archive does not exist'
do
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:build
)
{
create
(
:ci_build
)
}
...
@@ -144,25 +142,19 @@ describe Ci::Build do
...
@@ -144,25 +142,19 @@ describe Ci::Build do
end
end
context
'artifacts archive exists'
do
context
'artifacts archive exists'
do
let
(
:build
)
{
create
(
:ci_build
,
:artifacts
)
}
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
context
'is expired'
do
context
'is expired'
do
let
!
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
:expired
)
}
let
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
:expired
)
}
it
{
is_expected
.
to
be_falsy
}
it
{
is_expected
.
to
be_falsy
}
end
end
context
'is not expired'
do
it
{
is_expected
.
to
be_truthy
}
end
end
end
end
end
context
'when legacy artifacts are used'
do
context
'when legacy artifacts are used'
do
let
(
:build
)
{
create
(
:ci_build
,
:legacy_artifacts
)
}
subject
{
build
.
artifacts?
}
context
'artifacts archive does not exist'
do
context
'artifacts archive does not exist'
do
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:build
)
{
create
(
:ci_build
)
}
...
@@ -170,17 +162,15 @@ describe Ci::Build do
...
@@ -170,17 +162,15 @@ describe Ci::Build do
end
end
context
'artifacts archive exists'
do
context
'artifacts archive exists'
do
let
(
:build
)
{
create
(
:ci_build
,
:legacy_artifacts
)
}
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
context
'is expired'
do
context
'is expired'
do
let
!
(
:build
)
{
create
(
:ci_build
,
:legacy_artifacts
,
:expired
)
}
let
(
:build
)
{
create
(
:ci_build
,
:legacy_artifacts
,
:expired
)
}
it
{
is_expected
.
to
be_falsy
}
it
{
is_expected
.
to
be_falsy
}
end
end
context
'is not expired'
do
it
{
is_expected
.
to
be_truthy
}
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