Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
commit419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch)
tree1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /spec/models/integrations/integration_list_spec.rb
parent1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff)
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'spec/models/integrations/integration_list_spec.rb')
-rw-r--r--spec/models/integrations/integration_list_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/models/integrations/integration_list_spec.rb b/spec/models/integrations/integration_list_spec.rb
new file mode 100644
index 00000000000..b7ccbcecf6b
--- /dev/null
+++ b/spec/models/integrations/integration_list_spec.rb
@@ -0,0 +1,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 eq([
+ Integration,
+ %w[active category project_id],
+ [['true', 'common', projects.first.id], ['true', 'common', projects.second.id]]
+ ])
+ end
+ end
+end