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