Commit 1e2c28ab authored by Sean McGivern's avatar Sean McGivern

Simplify WikiPage#hook_attrs spec

parent 35d2a058
...@@ -555,14 +555,12 @@ describe WikiPage do ...@@ -555,14 +555,12 @@ describe WikiPage do
end end
describe '#hook_attrs' do 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)") create_page("test page", "test![WikiPage_Image](/uploads/abc/WikiPage_Image.png)")
@page = wiki.wiki.page(title: "test page") page = wiki.wiki.page(title: "test page")
@wiki_page = described_class.new(wiki, @page, true) wiki_page = described_class.new(wiki, page, true)
end
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
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment