2019-04-11 08:17:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-10-05 15:01:06 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2021-03-05 04:09:07 -05:00
|
|
|
RSpec.describe Boards::BoardsFinder 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'
|
2020-01-17 10:08:37 -05:00
|
|
|
it_behaves_like 'multiple 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
|