diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-18 03:39:21 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 19:58:27 +0300 |
commit | 49ec98d1b2ca6f57f3f9434a0be0018fa5a53681 (patch) | |
tree | acef0f1ad0f9e5b1665b9e2c33f895754cbbc17a /spec/services/labels | |
parent | 301264beada6aaf7dd0e4244c3f41131f9b4f359 (diff) |
Recreates the label priorities when moving project to another group
Diffstat (limited to 'spec/services/labels')
-rw-r--r-- | spec/services/labels/transfer_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/labels/transfer_service_spec.rb b/spec/services/labels/transfer_service_spec.rb index a72a05f6c99..cb09c16698a 100644 --- a/spec/services/labels/transfer_service_spec.rb +++ b/spec/services/labels/transfer_service_spec.rb @@ -26,6 +26,16 @@ describe Labels::TransferService, services: true do expect { service.execute }.to change(project.labels, :count).by(2) end + it 'recreates label priorities related to the missing group labels' do + create(:label_priority, project: project, label: group_label_1, priority: 1) + + service.execute + + new_project_label = project.labels.find_by(title: group_label_1.title) + expect(new_project_label.id).not_to eq group_label_1.id + expect(new_project_label.priorities).not_to be_empty + end + it 'does not recreate missing group labels that are not applied to issues or merge requests' do service.execute |