diff options
Diffstat (limited to 'spec/lib/gitlab/database/pg_depend_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/pg_depend_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/pg_depend_spec.rb b/spec/lib/gitlab/database/pg_depend_spec.rb new file mode 100644 index 00000000000..547a2c84b76 --- /dev/null +++ b/spec/lib/gitlab/database/pg_depend_spec.rb @@ -0,0 +1,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 |