Sha256: 1d62f40ac3ddad0263a3d750d76e27ff484707f6acf93a2147754d2f50b9132e
Contents?: true
Size: 599 Bytes
Versions: 16
Compression:
Stored size: 599 Bytes
Contents
require 'spec_helper' RSpec.describe ROM::SQL::Schema, '#call' do include_context 'users' with_adapters :postgres do before do conf.relation(:users) do schema(infer: true) end end let(:schema) { relations[:users].schema } it 'auto-projects a relation' do expect(schema.(relations[:users]).dataset.sql).to eql('SELECT "id", "name" FROM "users" ORDER BY "users"."id"') end it 'maintains schema' do projected = relations[:users].schema.project(:name) expect(projected.(relations[:users]).schema).to be(projected) end end end
Version data entries
16 entries across 16 versions & 1 rubygems