diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-13 17:45:39 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 14:58:26 -0200 |
commit | cece77f273407da4a9ed66acda53e9ac4117dbaf (patch) | |
tree | dd758c4ad986de70f3a100c1f3bdc6782aea3f61 /spec | |
parent | fc59d357201a907e6079f6f0a7fc9a31f2957f88 (diff) | |
download | gitlab-ce-cece77f273407da4a9ed66acda53e9ac4117dbaf.tar.gz |
Fix validation to allow updates to description/color of project label
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_label_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/project_label_spec.rb b/spec/models/project_label_spec.rb index 7966c52c38d..c861d4b73bb 100644 --- a/spec/models/project_label_spec.rb +++ b/spec/models/project_label_spec.rb @@ -40,6 +40,16 @@ describe ProjectLabel, models: true do expect(label.errors[:title]).to be_empty end + + it 'does not returns error when title does not change' do + project_label = create(:label, project: project, name: 'Security') + create(:group_label, group: group, name: 'Security') + project_label.description = 'Security related stuff.' + + project_label.valid? + + expect(project_label .errors[:title]).to be_empty + end end end |