Sha256: a1b25312ae23b508568d4cca46a57d94be2ce33c1216afaf0e8399d65c9e679d

Contents?: true

Size: 461 Bytes

Versions: 27

Compression:

Stored size: 461 Bytes

Contents

require 'spec_helper'

describe ActionView::Base do
  describe '#escape_json' do
    let(:view) { ActionView::Base.new }

    it "should escape \u2028 characters" do
      expect(view.escape_json(%(unicode \342\200\250).force_encoding('UTF-8').encode!)).to eq %(unicode \u2028)
    end

    it "should escape \u2029 characters" do
      expect(view.escape_json(%(unicode \342\200\251).force_encoding('UTF-8').encode!)).to eq %(unicode \u2029)
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
locomotivecms-3.3.0 spec/lib/action_view_spec.rb
locomotivecms-3.3.0.rc3 spec/lib/action_view_spec.rb
locomotivecms-3.3.0.rc2 spec/lib/action_view_spec.rb
locomotivecms-3.1.2 spec/lib/action_view_spec.rb
locomotivecms-3.2.1 spec/lib/action_view_spec.rb
locomotivecms-3.3.0.rc1 spec/lib/action_view_spec.rb
locomotivecms-3.2.0 spec/lib/action_view_spec.rb
locomotivecms-3.2.0.rc2 spec/lib/action_view_spec.rb
locomotivecms-3.2.0.rc1 spec/lib/action_view_spec.rb
locomotivecms-3.1.1 spec/lib/action_view_spec.rb
locomotivecms-3.1.0 spec/lib/action_view_spec.rb
locomotivecms-3.1.0.rc3 spec/lib/action_view_spec.rb
locomotivecms-3.1.0.rc2 spec/lib/action_view_spec.rb
locomotivecms-3.1.0.rc1 spec/lib/action_view_spec.rb
locomotivecms-3.0.1 spec/lib/action_view_spec.rb
locomotivecms-3.0.0 spec/lib/action_view_spec.rb
locomotivecms-3.0.0.rc7 spec/lib/action_view_spec.rb
locomotivecms-3.0.0.rc6 spec/lib/action_view_spec.rb
locomotivecms-3.0.0.rc5 spec/lib/action_view_spec.rb
locomotivecms-3.0.0.rc4 spec/lib/action_view_spec.rb