mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
14 lines
305 B
Ruby
14 lines
305 B
Ruby
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
|