2013-08-27 14:57:42 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe ApplicationHelper do
|
|
|
|
|
2013-11-04 21:40:39 -05:00
|
|
|
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
|
|
|
|
|
2013-08-27 14:57:42 -04:00
|
|
|
end
|