summaryrefslogtreecommitdiff
path: root/spec/initializers/0_postgresql_types_spec.rb
blob: 76b243033d025e191806cfebb432794577168bb9 (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.send(: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