diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-06 21:09:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-06 21:09:41 +0300 |
commit | 37419c44f04cd802ac89fe2d54b8501a0718a5e3 (patch) | |
tree | 7ff8770bf860a7aed343aa08fae8caa11c65e10d /spec/services/boards | |
parent | 5f4dec4ac396f844fa55ecd9a8563a0348872ef6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/boards')
-rw-r--r-- | spec/services/boards/lists/create_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/boards/lists/create_service_spec.rb b/spec/services/boards/lists/create_service_spec.rb index f3d4e62eeca..88b6c3098d1 100644 --- a/spec/services/boards/lists/create_service_spec.rb +++ b/spec/services/boards/lists/create_service_spec.rb @@ -59,6 +59,21 @@ RSpec.describe Boards::Lists::CreateService do expect { service.execute(board) }.to raise_error(ActiveRecord::RecordNotFound) end end + + context 'when backlog param is sent' do + it 'creates one and only one backlog list' do + service = described_class.new(parent, user, 'backlog' => true) + list = service.execute(board) + + expect(list.list_type).to eq('backlog') + expect(list.position).to be_nil + expect(list).to be_valid + + another_backlog = service.execute(board) + + expect(another_backlog).to eq list + end + end end context 'when board parent is a project' do |