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
cfffc9ef
Commit
cfffc9ef
authored
Jan 05, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update build specs for artifacts browser support
parent
e5d2a81b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
spec/models/build_spec.rb
spec/models/build_spec.rb
+11
-12
No files found.
spec/models/build_spec.rb
View file @
cfffc9ef
...
@@ -394,21 +394,20 @@ describe Ci::Build, models: true do
...
@@ -394,21 +394,20 @@ describe Ci::Build, models: true do
describe
:artifacts_browser_supported?
do
describe
:artifacts_browser_supported?
do
subject
{
build
.
artifacts_browser_supported?
}
subject
{
build
.
artifacts_browser_supported?
}
before
do
context
'artifacts metadata does not exist'
do
file
=
fixture_file_upload
(
archive_file
,
archive_type
)
build
.
update_attributes
(
artifacts_file:
file
)
end
context
'artifacts archive is not a zip file'
do
let
(
:archive_file
)
{
Rails
.
root
+
'spec/fixtures/banana_sample.gif'
}
let
(
:archive_type
)
{
'image/gif'
}
it
{
is_expected
.
to
be_falsy
}
it
{
is_expected
.
to
be_falsy
}
end
end
context
'artifacts archive is a zip file'
do
context
'artifacts archive is a zip file and metadata exists'
do
let
(
:archive_file
)
{
Rails
.
root
+
'spec/fixtures/ci_build_artifacts.zip'
}
before
do
let
(
:archive_type
)
{
'application/zip'
}
fixture_dir
=
Rails
.
root
+
'spec/fixtures/'
archive
=
fixture_file_upload
(
fixture_dir
+
'ci_build_artifacts.zip'
,
'application/zip'
)
metadata
=
fixture_file_upload
(
fixture_dir
+
'ci_build_artifacts_metadata.gz'
,
'application/x-gzip'
)
build
.
update_attributes
(
artifacts_file:
archive
)
build
.
update_attributes
(
artifacts_metadata:
metadata
)
end
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
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