Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-05-05 00:21:57 +0300
committerFelipe Artur <felipefac@gmail.com>2016-05-05 22:37:49 +0300
commitd028863eda8b97f6e4db129ef57f0d3a2130c9b3 (patch)
tree010e2d279ef301b4fa301815c9878983ffb240cf /spec/models/label_spec.rb
parentfad7b392dc633fb689e657af8b7fad346ede416e (diff)
Sanitize milestones and label titles
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