diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-05-04 18:21:57 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-05-05 16:37:49 -0300 |
commit | d028863eda8b97f6e4db129ef57f0d3a2130c9b3 (patch) | |
tree | 010e2d279ef301b4fa301815c9878983ffb240cf /spec/models/label_spec.rb | |
parent | fad7b392dc633fb689e657af8b7fad346ede416e (diff) | |
download | gitlab-ce-d028863eda8b97f6e4db129ef57f0d3a2130c9b3.tar.gz |
Sanitize milestones and label titlesissue_15394
Diffstat (limited to 'spec/models/label_spec.rb')
-rw-r--r-- | spec/models/label_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/label_spec.rb b/spec/models/label_spec.rb index 0614ca1e7c9..b61c55a3f6d 100644 --- a/spec/models/label_spec.rb +++ b/spec/models/label_spec.rb @@ -55,6 +55,14 @@ describe Label, models: true do end end + describe "#title" do + let(:label) { create(:label, title: "<b>test</b>") } + + it "sanitizes title" do + expect(label.title).to eq("test") + end + end + describe '#to_reference' do context 'using id' do it 'returns a String reference to the object' do |