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

pg_depend_spec.rb « database « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 547a2c84b7617d884fa9763ef3e70fbb4860290c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Database::PgDepend, type: :model, feature_category: :database do
  let(:connection) { described_class.connection }

  describe '.from_pg_extension' do
    subject { described_class.from_pg_extension('VIEW') }

    context 'when having views as dependency' do
      before do
        connection.execute('CREATE EXTENSION IF NOT EXISTS pg_stat_statements;')
      end

      it 'returns pg_stat_statements', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/410508' do
        expect(subject.pluck('relname')).to eq(['pg_stat_statements'])
      end
    end
  end
end