diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/lib/gitlab/pagination/keyset | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/lib/gitlab/pagination/keyset')
-rw-r--r-- | spec/lib/gitlab/pagination/keyset/in_operator_optimization/array_scope_columns_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/pagination/keyset/in_operator_optimization/array_scope_columns_spec.rb b/spec/lib/gitlab/pagination/keyset/in_operator_optimization/array_scope_columns_spec.rb index 2cebf0d9473..087bfb197ec 100644 --- a/spec/lib/gitlab/pagination/keyset/in_operator_optimization/array_scope_columns_spec.rb +++ b/spec/lib/gitlab/pagination/keyset/in_operator_optimization/array_scope_columns_spec.rb @@ -16,4 +16,13 @@ RSpec.describe Gitlab::Pagination::Keyset::InOperatorOptimization::ArrayScopeCol it { expect { array_scope_columns }.to raise_error /No array columns were given/ } end + + context 'when Arel AS node is given as input' do + let(:scope) { Issue.select(Issue.arel_table[:id].as('id'), :title) } + let(:columns) { scope.select_values } + + it 'works with Arel AS nodes' do + expect(array_scope_columns.array_aggregated_column_names).to eq(%w[array_cte_id_array array_cte_title_array]) + end + end end |