diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/lib/gitlab/sql/cte_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/sql/cte_spec.rb')
-rw-r--r-- | spec/lib/gitlab/sql/cte_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/sql/cte_spec.rb b/spec/lib/gitlab/sql/cte_spec.rb index 4cf94f4dcab..18ae2cb065f 100644 --- a/spec/lib/gitlab/sql/cte_spec.rb +++ b/spec/lib/gitlab/sql/cte_spec.rb @@ -8,9 +8,9 @@ RSpec.describe Gitlab::SQL::CTE do relation = User.where(id: 1) cte = described_class.new(:cte_name, relation) sql = cte.to_arel.to_sql - name = ActiveRecord::Base.connection.quote_table_name(:cte_name) + name = ApplicationRecord.connection.quote_table_name(:cte_name) - sql1 = ActiveRecord::Base.connection.unprepared_statement do + sql1 = ApplicationRecord.connection.unprepared_statement do relation.except(:order).to_sql end @@ -30,8 +30,8 @@ RSpec.describe Gitlab::SQL::CTE do cte = described_class.new(:cte_name, nil) table = Arel::Table.new(:kittens) - source_name = ActiveRecord::Base.connection.quote_table_name(:cte_name) - alias_name = ActiveRecord::Base.connection.quote_table_name(:kittens) + source_name = ApplicationRecord.connection.quote_table_name(:cte_name) + alias_name = ApplicationRecord.connection.quote_table_name(:kittens) expect(cte.alias_to(table).to_sql).to eq("#{source_name} AS #{alias_name}") end |