BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d23337fd
Commit
d23337fd
authored
Mar 07, 2018
by
haseeb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix failing spec
parent
101c3708
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
snippets_helper.rb
app/helpers/snippets_helper.rb
+1
-1
snippets_helper_spec.rb
spec/helpers/snippets_helper_spec.rb
+4
-4
No files found.
app/helpers/snippets_helper.rb
View file @
d23337fd
...
...
@@ -126,7 +126,7 @@ module SnippetsHelper
raw_project_snippet_url
(
@snippet
.
project
,
@snippet
,
inline:
false
)
end
link_to
external_snippet_icon
(
'download'
),
download_url
,
class:
'btn'
,
target:
'_blank'
,
title:
'Download'
,
data:
{
container:
'body'
},
rel:
'noopener noreferrer'
link_to
external_snippet_icon
(
'download'
),
download_url
,
class:
'btn'
,
target:
'_blank'
,
title:
'Download'
,
rel:
'noopener noreferrer'
end
def
public_snippet?
...
...
spec/helpers/snippets_helper_spec.rb
View file @
d23337fd
...
...
@@ -7,13 +7,13 @@ describe SnippetsHelper do
it
'gives view raw button of embedded snippets for project snippets'
do
@snippet
=
create
(
:project_snippet
,
:public
)
expect
(
embedded_snippet_raw_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
rel=
\"
noopener noreferrer
\"
title=
\"
Open raw
\"
data-container=
\"
body
\"
href=
\"
#{
raw_project_snippet_url
(
@snippet
.
project
,
@snippet
)
}
\"
>
#{
external_snippet_icon
(
'doc_code'
)
}
</a>"
)
expect
(
embedded_snippet_raw_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
rel=
\"
noopener noreferrer
\"
title=
\"
Open raw
\"
href=
\"
#{
raw_project_snippet_url
(
@snippet
.
project
,
@snippet
)
}
\"
>
#{
external_snippet_icon
(
'doc_code'
)
}
</a>"
)
end
it
'gives view raw button of embedded snippets for personal snippets'
do
@snippet
=
create
(
:personal_snippet
,
:public
)
expect
(
embedded_snippet_raw_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
rel=
\"
noopener noreferrer
\"
title=
\"
Open raw
\"
data-container=
\"
body
\"
href=
\"
#{
raw_snippet_url
(
@snippet
)
}
\"
>
#{
external_snippet_icon
(
'doc_code'
)
}
</a>"
)
expect
(
embedded_snippet_raw_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
rel=
\"
noopener noreferrer
\"
title=
\"
Open raw
\"
href=
\"
#{
raw_snippet_url
(
@snippet
)
}
\"
>
#{
external_snippet_icon
(
'doc_code'
)
}
</a>"
)
end
end
...
...
@@ -21,13 +21,13 @@ describe SnippetsHelper do
it
'gives download button of embedded snippets for project snippets'
do
@snippet
=
create
(
:project_snippet
,
:public
)
expect
(
embedded_snippet_download_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
title=
\"
Download
\"
data-container=
\"
body
\"
rel=
\"
noopener noreferrer
\"
href=
\"
#{
raw_project_snippet_url
(
@snippet
.
project
,
@snippet
,
inline:
false
)
}
\"
>
#{
external_snippet_icon
(
'download'
)
}
</a>"
)
expect
(
embedded_snippet_download_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
title=
\"
Download
\"
rel=
\"
noopener noreferrer
\"
href=
\"
#{
raw_project_snippet_url
(
@snippet
.
project
,
@snippet
,
inline:
false
)
}
\"
>
#{
external_snippet_icon
(
'download'
)
}
</a>"
)
end
it
'gives download button of embedded snippets for personal snippets'
do
@snippet
=
create
(
:personal_snippet
,
:public
)
expect
(
embedded_snippet_download_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
title=
\"
Download
\"
data-container=
\"
body
\"
rel=
\"
noopener noreferrer
\"
href=
\"
#{
raw_snippet_url
(
@snippet
,
inline:
false
)
}
\"
>
#{
external_snippet_icon
(
'download'
)
}
</a>"
)
expect
(
embedded_snippet_download_button
.
to_s
).
to
eq
(
"<a class=
\"
btn
\"
target=
\"
_blank
\"
title=
\"
Download
\"
rel=
\"
noopener noreferrer
\"
href=
\"
#{
raw_snippet_url
(
@snippet
,
inline:
false
)
}
\"
>
#{
external_snippet_icon
(
'download'
)
}
</a>"
)
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