2016-10-05 15:01:06 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-07-10 10:24:02 -04:00
|
|
|
describe Boards::ListService do
|
2016-10-05 15:01:06 -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-05 15:01:06 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
subject(:service) { described_class.new(parent, double) }
|
2016-10-05 15:01:06 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
it_behaves_like 'boards list service'
|
2016-10-05 15:01:06 -04:00
|
|
|
end
|
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
context 'when board parent is a group' do
|
|
|
|
let(:parent) { create(:group) }
|
2016-10-05 15:01:06 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
subject(:service) { described_class.new(parent, double) }
|
2016-10-05 15:01:06 -04:00
|
|
|
|
2018-02-19 14:06:16 -05:00
|
|
|
it_behaves_like 'boards list service'
|
2016-10-05 15:01:06 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|