mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
work around bust encodings passed in to method
This commit is contained in:
@@ -2,7 +2,16 @@ require 'spec_helper'
|
||||
|
||||
describe ApplicationHelper do
|
||||
|
||||
describe 'mobile_view?' 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
|
||||
|
||||
describe "mobile_view?" do
|
||||
context "enable_mobile_theme is true" do
|
||||
before do
|
||||
SiteSetting.stubs(:enable_mobile_theme).returns(true)
|
||||
|
||||
Reference in New Issue
Block a user