Skip to content
代码片段 群组 项目
提交 f993130b 编辑于 作者: Robert Speicher's avatar Robert Speicher
浏览文件

Fix specs expecting `emoji/` in image path

上级 fe13f58f
No related branches found
No related tags found
无相关合并请求
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
it 'should replace commit message with emoji to link' do it 'should replace commit message with emoji to link' do
actual = link_to_gfm(':book:Book', '/foo') actual = link_to_gfm(':book:Book', '/foo')
expect(actual). expect(actual).
to eq %Q(<img class="emoji" title=":book:" alt=":book:" src="http://localhost/assets/emoji/1F4D6.png" height="20" width="20" align="absmiddle"><a href="/foo">Book</a>) to eq %Q(<img class="emoji" title=":book:" alt=":book:" src="http://localhost/assets/1F4D6.png" height="20" width="20" align="absmiddle"><a href="/foo">Book</a>)
end end
end end
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
it 'replaces supported emoji' do it 'replaces supported emoji' do
doc = filter('<p>:heart:</p>') doc = filter('<p>:heart:</p>')
expect(doc.css('img').first.attr('src')).to eq 'https://foo.com/assets/emoji/2764.png' expect(doc.css('img').first.attr('src')).to eq 'https://foo.com/assets/2764.png'
end end
it 'ignores unsupported emoji' do it 'ignores unsupported emoji' do
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
it 'correctly encodes the URL' do it 'correctly encodes the URL' do
doc = filter('<p>:+1:</p>') doc = filter('<p>:+1:</p>')
expect(doc.css('img').first.attr('src')).to eq 'https://foo.com/assets/emoji/1F44D.png' expect(doc.css('img').first.attr('src')).to eq 'https://foo.com/assets/1F44D.png'
end end
it 'matches at the start of a string' do it 'matches at the start of a string' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册