2019-04-11 08:17:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-07-27 16:41:19 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-07-10 10:24:02 -04:00
|
|
|
describe Boards::CreateService do
|
2016-07-27 16:41:19 -04:00
|
|
|
describe '#execute' do
|
2018-02-19 14:06:16 -05:00
|
|
|
context 'when board parent is a project' do
|
|
|
|
let(:parent) { create(:project) }
|
2016-10-06 15:20:21 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
subject(:service) { described_class.new(parent, double) }
|
2016-07-27 16:41:19 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
it_behaves_like 'boards create service'
|
2016-07-27 16:41:19 -04:00
|
|
|
end
|
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
context 'when board parent is a group' do
|
|
|
|
let(:parent) { create(:group) }
|
2016-07-27 16:41:19 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
subject(:service) { described_class.new(parent, double) }
|
2017-07-07 05:50:01 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
it_behaves_like 'boards create service'
|
2016-07-27 16:41:19 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|