2019-07-31 22:56:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Boards::ListService do
|
2016-11-03 12:29:30 +05:30
|
|
|
describe '#execute' do
|
2018-03-27 19:54:05 +05:30
|
|
|
context 'when board parent is a project' do
|
|
|
|
let(:parent) { create(:project) }
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
subject(:service) { described_class.new(parent, double) }
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
it_behaves_like 'boards list service'
|
2020-03-13 15:44:24 +05:30
|
|
|
it_behaves_like 'multiple boards list service'
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
context 'when board parent is a group' do
|
|
|
|
let(:parent) { create(:group) }
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
subject(:service) { described_class.new(parent, double) }
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
it_behaves_like 'boards list service'
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|