diff options
author | Long Nguyen <long.polyglot@gmail.com> | 2016-05-05 13:59:09 +0700 |
---|---|---|
committer | Long Nguyen <long.polyglot@gmail.com> | 2016-05-05 13:59:09 +0700 |
commit | 91f693c0c4f1ebb62d78e6c82b833f8a19c4dc62 (patch) | |
tree | 398f06cc73d866bfb006cf1eae33d51eee47b099 /spec/services/issues | |
parent | f43044cc8abb23f391f635e145b52cf5a54a0058 (diff) | |
download | gitlab-ce-91f693c0c4f1ebb62d78e6c82b833f8a19c4dc62.tar.gz |
Update changelog, improve specs
Diffstat (limited to 'spec/services/issues')
-rw-r--r-- | spec/services/issues/move_service_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb index 7399003bd75..c15e26189a5 100644 --- a/spec/services/issues/move_service_spec.rb +++ b/spec/services/issues/move_service_spec.rb @@ -7,9 +7,7 @@ describe Issues::MoveService, services: true do let(:description) { 'Some issue description' } let(:old_project) { create(:project) } let(:new_project) { create(:project) } - let!(:milestone1) do - create(:milestone, project_id: old_project.id, title: 'v9.0') - end + let(:milestone1) { create(:milestone, project_id: old_project.id, title: 'v9.0') } let(:old_issue) do create(:issue, title: title, description: description, @@ -57,6 +55,7 @@ describe Issues::MoveService, services: true do it 'assigns milestone to new issue' do expect(new_issue.reload.milestone.title).to eq 'v9.0' + expect(new_issue.reload.milestone).to eq(milestone2) end it 'assign labels to new issue' do @@ -64,6 +63,11 @@ describe Issues::MoveService, services: true do expect(expected_label_titles).to include 'label1' expect(expected_label_titles).to include 'label2' expect(expected_label_titles.size).to eq 2 + + new_issue.labels.each do |label| + expect(new_project.labels).to include(label) + expect(old_project.labels).not_to include(label) + end end it 'rewrites issue title' do |