summaryrefslogtreecommitdiff
path: root/spec/models/label_spec.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-05-04 18:21:57 -0300
committerFelipe Artur <felipefac@gmail.com>2016-05-05 16:37:49 -0300
commitd028863eda8b97f6e4db129ef57f0d3a2130c9b3 (patch)
tree010e2d279ef301b4fa301815c9878983ffb240cf /spec/models/label_spec.rb
parentfad7b392dc633fb689e657af8b7fad346ede416e (diff)
downloadgitlab-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.rb8
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