Sha256: 80c66e0069c1bdab3f89aa176e8165cd271d430dbfc4be7c6110644207230af6
Contents?: true
Size: 521 Bytes
Versions: 1
Compression:
Stored size: 521 Bytes
Contents
describe ActiveSupport::SafeBuffer do describe '#<<' do it 'escapes angular braces' do subject << "{{unsafe}}" expect(subject.to_s).to eq("{{ $root.DOUBLE_LEFT_CURLY_BRACE }}unsafe}}") end it 'allows concatting nil' do expect { subject << nil }.to_not raise_error end end describe '#+' do it 'escapes angular braces' do combined_string = subject + "{{unsafe}}" expect(combined_string.to_s).to eq("{{ $root.DOUBLE_LEFT_CURLY_BRACE }}unsafe}}") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
angular_xss-1.0.0 | spec/angular_xss/safe_buffer_spec.rb |