Commit d6dda952 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tests for emojione

parent d2d709a2
......@@ -52,6 +52,8 @@ v 7.9.0 (unreleased)
- Starred projects page at dashboard
- Make email display name configurable
- Improve json validation in hook data
- Use Emoji One
v 7.8.4
- Fix issue_tracker_id substitution in custom issue trackers
- Fix path and name duplication in namespaces
......
......@@ -664,19 +664,19 @@ describe GitlabMarkdownHelper do
it "should generate absolute urls for emoji" do
expect(markdown(':smile:')).to(
include(%(src="#{Gitlab.config.gitlab.url}/assets/emoji/smile.png))
include(%(src="#{Gitlab.config.gitlab.url}/assets/emoji/#{Emoji.emoji_filename('smile')}.png))
)
end
it "should generate absolute urls for emoji if relative url is present" do
allow(Gitlab.config.gitlab).to receive(:url).and_return('http://localhost/gitlab/root')
expect(markdown(":smile:")).to include("src=\"http://localhost/gitlab/root/assets/emoji/smile.png")
expect(markdown(":smile:")).to include("src=\"http://localhost/gitlab/root/assets/emoji/#{Emoji.emoji_filename('smile')}.png")
end
it "should generate absolute urls for emoji if asset_host is present" do
allow(Gitlab::Application.config).to receive(:asset_host).and_return("https://cdn.example.com")
ActionView::Base.any_instance.stub_chain(:config, :asset_host).and_return("https://cdn.example.com")
expect(markdown(":smile:")).to include("src=\"https://cdn.example.com/assets/emoji/smile.png")
expect(markdown(":smile:")).to include("src=\"https://cdn.example.com/assets/emoji/#{Emoji.emoji_filename('smile')}.png")
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