blob: 4bb7b100bc0eb7aa4162ca5dfba173823587750a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Integrations::IntegrationList, feature_category: :integrations do
let_it_be(:projects) { create_pair(:project, :small_repo) }
let(:batch) { Project.where(id: projects.pluck(:id)) }
let(:integration_hash) { { 'active' => 'true', 'category' => 'common' } }
let(:association) { 'project' }
subject { described_class.new(batch, integration_hash, association) }
describe '#to_array' do
it 'returns array of Integration, columns, and values' do
expect(subject.to_array).to match_array([
Integration,
%w[active category project_id],
contain_exactly(['true', 'common', projects.first.id], ['true', 'common', projects.second.id])
])
end
end
end
|