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
Jérome Perrin
gitlab-ce
Commits
d1dd1153
Commit
d1dd1153
authored
Oct 05, 2017
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test to use the new API
parent
e4d07f12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
spec/models/ci/artifact_blob_spec.rb
spec/models/ci/artifact_blob_spec.rb
+10
-3
No files found.
spec/models/ci/artifact_blob_spec.rb
View file @
d1dd1153
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
ArtifactBlob
do
describe
Ci
::
ArtifactBlob
do
set
(
:build
)
{
create
(
:ci_build
,
:artifacts
)
}
set
(
:project
)
{
create
(
:project
,
:public
)
}
set
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
project:
project
)
}
let
(
:entry
)
{
build
.
artifacts_metadata_entry
(
'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif'
)
}
let
(
:entry
)
{
build
.
artifacts_metadata_entry
(
'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif'
)
}
subject
{
described_class
.
new
(
entry
)
}
subject
{
described_class
.
new
(
entry
)
}
...
@@ -74,12 +75,18 @@ describe Ci::ArtifactBlob do
...
@@ -74,12 +75,18 @@ describe Ci::ArtifactBlob do
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:artifacts_server
).
and_return
(
true
)
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:artifacts_server
).
and_return
(
true
)
end
end
it
{
is_expected
.
not_to
be_external_link
}
context
'gif extensions'
do
it
'returns false'
do
expect
(
subject
.
external_link?
(
build
)).
to
be
false
end
end
context
'txt extensions'
do
context
'txt extensions'
do
let
(
:entry
)
{
build
.
artifacts_metadata_entry
(
'other_artifacts_0.1.2/doc_sample.txt'
)
}
let
(
:entry
)
{
build
.
artifacts_metadata_entry
(
'other_artifacts_0.1.2/doc_sample.txt'
)
}
it
{
is_expected
.
to
be_external_link
}
it
'returns true'
do
expect
(
subject
.
external_link?
(
build
)).
to
be
true
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