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
Léo-Paul Géneau
gitlab-ce
Commits
fdc602e4
Commit
fdc602e4
authored
Apr 11, 2019
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use cleaner expectation matchers from Capybara
parent
34243489
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
spec/views/projects/tags/index.html.haml_spec.rb
spec/views/projects/tags/index.html.haml_spec.rb
+5
-8
No files found.
spec/views/projects/tags/index.html.haml_spec.rb
View file @
fdc602e4
...
...
@@ -7,9 +7,6 @@ describe 'projects/tags/index' do
let
(
:release
)
{
create
(
:release
,
project:
project
,
sha:
git_tag
.
target_commit
.
sha
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
:success
,
project:
project
,
ref:
git_tag
.
name
,
sha:
release
.
sha
)
}
let
(
:artifacts_download_header_regex
)
{
%r(<li class="dropdown-bold-header">Download artifacts<
\/
li>)
}
let
(
:artifacts_download_link_selector
)
{
'a[href="'
+
latest_succeeded_project_artifacts_path
(
project
,
"
#{
pipeline
.
ref
}
/download"
,
job:
'test'
)
+
'"]'
}
before
do
assign
(
:project
,
project
)
assign
(
:repository
,
project
.
repository
)
...
...
@@ -31,12 +28,12 @@ describe 'projects/tags/index' do
it
'renders the Artifacts section in the download list'
do
render
expect
(
rendered
).
to
match
(
artifacts_download_header_regex
)
expect
(
rendered
).
to
have_selector
(
'li'
,
text:
'Artifacts'
)
end
it
'renders artifact download links'
do
render
expect
(
rendered
).
to
have_
selector
(
artifacts_download_link_selector
)
expect
(
rendered
).
to
have_
link
(
href:
latest_succeeded_project_artifacts_path
(
project
,
"
#{
pipeline
.
ref
}
/download"
,
job:
'test'
)
)
end
end
...
...
@@ -45,12 +42,12 @@ describe 'projects/tags/index' do
it
'does not render the Artifacts section in the download list'
do
render
expect
(
rendered
).
not_to
match
(
artifacts_download_header_regex
)
expect
(
rendered
).
not_to
have_selector
(
'li'
,
text:
'Artifacts'
)
end
it
'
renders
artifact download links'
do
it
'
does not render
artifact download links'
do
render
expect
(
rendered
).
not_to
have_
selector
(
artifacts_download_link_selector
)
expect
(
rendered
).
not_to
have_
link
(
href:
latest_succeeded_project_artifacts_path
(
project
,
"
#{
pipeline
.
ref
}
/download"
,
job:
'test'
)
)
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