summaryrefslogtreecommitdiff
path: root/spec/models/label_spec.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-21 17:47:58 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:24 -0200
commite28058c4107ce454a84b3e3b5750f936dace7db1 (patch)
tree8eb12341289e76b94907a12067ad8dc85b07f71e /spec/models/label_spec.rb
parentcfedd42badc6b84457d1de35cb31988777462d5a (diff)
downloadgitlab-ce-e28058c4107ce454a84b3e3b5750f936dace7db1.tar.gz
Validate if project label title does not exist at group level
Diffstat (limited to 'spec/models/label_spec.rb')
-rw-r--r--spec/models/label_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/label_spec.rb b/spec/models/label_spec.rb
index 1f1fe45d5a7..ab640e216cf 100644
--- a/spec/models/label_spec.rb
+++ b/spec/models/label_spec.rb
@@ -13,7 +13,7 @@ describe Label, models: true do
end
describe 'validation' do
- it { is_expected.to validate_uniqueness_of(:title) }
+ it { is_expected.to validate_uniqueness_of(:title).scoped_to([:group_id, :project_id]) }
it 'validates color code' do
is_expected.not_to allow_value('G-ITLAB').for(:color)