DEV: Use proper heredoc name.
This commit is contained in:
parent
c4419b7369
commit
70b73c2159
|
@ -121,14 +121,14 @@ describe PrettyText do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can onebox posts' do
|
it 'can onebox posts' do
|
||||||
post = Fabricate(:post, raw: <<~EOF)
|
post = Fabricate(:post, raw: <<~MD)
|
||||||
A post with a poll
|
A post with a poll
|
||||||
|
|
||||||
[poll type=regular]
|
[poll type=regular]
|
||||||
* Hello
|
* Hello
|
||||||
* World
|
* World
|
||||||
[/poll]
|
[/poll]
|
||||||
EOF
|
MD
|
||||||
|
|
||||||
onebox = Oneboxer.onebox_raw(post.full_url, user_id: Fabricate(:user).id)
|
onebox = Oneboxer.onebox_raw(post.full_url, user_id: Fabricate(:user).id)
|
||||||
doc = Nokogiri::HTML(onebox[:preview])
|
doc = Nokogiri::HTML(onebox[:preview])
|
||||||
|
@ -138,14 +138,14 @@ describe PrettyText do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can reduce excerpts' do
|
it 'can reduce excerpts' do
|
||||||
post = Fabricate(:post, raw: <<~EOF)
|
post = Fabricate(:post, raw: <<~MD)
|
||||||
A post with a poll
|
A post with a poll
|
||||||
|
|
||||||
[poll type=regular]
|
[poll type=regular]
|
||||||
* Hello
|
* Hello
|
||||||
* World
|
* World
|
||||||
[/poll]
|
[/poll]
|
||||||
EOF
|
MD
|
||||||
|
|
||||||
excerpt = PrettyText.excerpt(post.cooked, SiteSetting.post_onebox_maxlength, post: post)
|
excerpt = PrettyText.excerpt(post.cooked, SiteSetting.post_onebox_maxlength, post: post)
|
||||||
expect(excerpt).to eq("A post with a poll \n<a href=\"#{post.url}\">poll</a>")
|
expect(excerpt).to eq("A post with a poll \n<a href=\"#{post.url}\">poll</a>")
|
||||||
|
|
Loading…
Reference in New Issue