diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-20 06:17:04 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 19:58:24 +0300 |
commit | 9463551ece6c12574559a4768943ab90db7f617b (patch) | |
tree | a4fc438116b4cac6180df8ff8d8d974ad5d4d0c2 /spec/models/label_spec.rb | |
parent | bdb7bf4b5188ffd68e54cbf671ba9ce1a4ffb1d1 (diff) |
Validates uniqueness of title unless label is a template
Diffstat (limited to 'spec/models/label_spec.rb')
-rw-r--r-- | spec/models/label_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/label_spec.rb b/spec/models/label_spec.rb index 5a5d1a5d60c..894021dc8e6 100644 --- a/spec/models/label_spec.rb +++ b/spec/models/label_spec.rb @@ -19,6 +19,7 @@ describe Label, models: true do describe 'validation' do it { is_expected.to validate_presence_of(:project) } + it { is_expected.to validate_uniqueness_of(:title) } it 'validates color code' do expect(label).not_to allow_value('G-ITLAB').for(:color) |