2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/spec/helpers/application_helper_spec.rb

15 lines
305 B
Ruby
Raw Normal View History

require 'spec_helper'
describe ApplicationHelper do
describe "escape_unicode" do
it "encodes tags" do
helper.escape_unicode("<tag>").should == "\u003ctag>"
end
it "survives junk text" do
helper.escape_unicode("hello \xc3\x28 world").should =~ /hello.*world/
end
end
end