Sha256: 528d4228236237176c792d07170d7f424755abf4086c662d9c4c489443687ce5
Contents?: true
Size: 600 Bytes
Versions: 4
Compression:
Stored size: 600 Bytes
Contents
require 'rom/sql/types' RSpec.describe 'ROM::SQL::Types', :postgres do describe 'ROM::SQL::Types::Serial' do it 'accepts ints > 0' do expect(ROM::SQL::Types::Serial[1]).to be(1) end it 'raises when input is <= 0' do expect { ROM::SQL::Types::Serial[0] }.to raise_error(Dry::Types::ConstraintError) end end describe ROM::SQL::Types::Blob do it 'coerces strings to Sequel::SQL::Blob' do input = 'sutin' output = described_class[input] expect(output).to be_instance_of(Sequel::SQL::Blob) expect(output).to eql('sutin') end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rom-sql-1.0.0.beta2 | spec/unit/types_spec.rb |
rom-sql-1.0.0.beta1 | spec/unit/types_spec.rb |
rom-sql-0.9.1 | spec/unit/types_spec.rb |
rom-sql-0.9.0 | spec/unit/types_spec.rb |