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
1e2c28ab
Commit
1e2c28ab
authored
Jul 17, 2018
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify WikiPage#hook_attrs spec
parent
35d2a058
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
spec/models/wiki_page_spec.rb
spec/models/wiki_page_spec.rb
+4
-6
No files found.
spec/models/wiki_page_spec.rb
View file @
1e2c28ab
...
...
@@ -555,14 +555,12 @@ describe WikiPage do
end
describe
'#hook_attrs'
do
before
do
it
'adds absolute urls for images in the content'
do
create_page
(
"test page"
,
"test![WikiPage_Image](/uploads/abc/WikiPage_Image.png)"
)
@page
=
wiki
.
wiki
.
page
(
title:
"test page"
)
@wiki_page
=
described_class
.
new
(
wiki
,
@page
,
true
)
end
page
=
wiki
.
wiki
.
page
(
title:
"test page"
)
wiki_page
=
described_class
.
new
(
wiki
,
page
,
true
)
it
'adds absolute urls for images in the content'
do
expect
(
@wiki_page
.
hook_attrs
[
'content'
]).
to
eq
(
"test![WikiPage_Image](
#{
Settings
.
gitlab
.
url
}
/uploads/abc/WikiPage_Image.png)"
)
expect
(
wiki_page
.
hook_attrs
[
'content'
]).
to
eq
(
"test![WikiPage_Image](
#{
Settings
.
gitlab
.
url
}
/uploads/abc/WikiPage_Image.png)"
)
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