Simplify WikiPage#hook_attrs spec
This commit is contained in:
parent
35d2a058e5
commit
1e2c28ab41
1 changed files with 5 additions and 7 deletions
|
@ -555,14 +555,12 @@ describe WikiPage do
|
|||
end
|
||||
|
||||
describe '#hook_attrs' do
|
||||
before 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
|
||||
|
||||
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)")
|
||||
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)
|
||||
|
||||
expect(wiki_page.hook_attrs['content']).to eq("test![WikiPage_Image](#{Settings.gitlab.url}/uploads/abc/WikiPage_Image.png)")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue