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

0_postgresql_types_spec.rb « initializers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 99f9b76a34e0fd3178cdad5aa8f89d1661734096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'PostgreSQL registered types' do
  subject(:types) { ApplicationRecord.connection.reload_type_map.keys }

  # These can be obtained via SELECT oid, typname from pg_type
  it 'includes custom and standard OIDs' do
    expect(types).to include(28, 194, 1034, 3220, 23, 20)
  end

  it 'includes custom and standard types' do
    expect(types).to include('xid', 'pg_node_tree', '_aclitem', 'pg_lsn', 'int4', 'int8')
  end
end