diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-19 23:34:27 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 19:58:24 +0300 |
commit | bf9d928b45516e716b0f7f099361ca03aa1454f8 (patch) | |
tree | ae76a1a61ecca3f55694c108c97a94610e499435 /spec/services/boards | |
parent | 398ab263fd08a5d9d7b19c5b3d06f33814a474eb (diff) |
Allow user to create a board list based on a group label
Diffstat (limited to 'spec/services/boards')
-rw-r--r-- | spec/services/boards/lists/create_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/services/boards/lists/generate_service_spec.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/boards/lists/create_service_spec.rb b/spec/services/boards/lists/create_service_spec.rb index e7806add916..a7e9efcf93f 100644 --- a/spec/services/boards/lists/create_service_spec.rb +++ b/spec/services/boards/lists/create_service_spec.rb @@ -9,6 +9,10 @@ describe Boards::Lists::CreateService, services: true do subject(:service) { described_class.new(project, user, label_id: label.id) } + before do + project.team << [user, :developer] + end + context 'when board lists is empty' do it 'creates a new list at beginning of the list' do list = service.execute(board) diff --git a/spec/services/boards/lists/generate_service_spec.rb b/spec/services/boards/lists/generate_service_spec.rb index 8b2f5e81338..ed0337662af 100644 --- a/spec/services/boards/lists/generate_service_spec.rb +++ b/spec/services/boards/lists/generate_service_spec.rb @@ -8,6 +8,10 @@ describe Boards::Lists::GenerateService, services: true do subject(:service) { described_class.new(project, user) } + before do + project.team << [user, :developer] + end + context 'when board lists is empty' do it 'creates the default lists' do expect { service.execute(board) }.to change(board.lists, :count).by(2) |