Sha256: 5ce84fff217e17efff01631c09aee4fc527b657196c573190f2353325c178ce6

Contents?: true

Size: 560 Bytes

Versions: 38

Compression:

Stored size: 560 Bytes

Contents

require_relative "spec_helper"

describe "pg_timestamptz extension" do
  before do
    @db = Sequel.mock(:host=>'postgres').extension :pg_timestamptz
  end

  it "should use timestamptz as default timestamp type" do
    @db.create_table(:t){Time :t; DateTime :tz; Time :ot, :only_time=>true}
    @db.sqls.must_equal ['CREATE TABLE "t" ("t" timestamptz, "tz" timestamptz, "ot" time)']
  end

  it "should use timestamptz when casting" do
    @db.get(Sequel.cast('a', Time))
    @db.sqls.must_equal ["SELECT CAST('a' AS timestamptz) AS \"v\" LIMIT 1"]
  end
end

Version data entries

38 entries across 35 versions & 2 rubygems

Version Path
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/sequel-5.26.0/spec/extensions/pg_timestamptz_spec.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/sequel-5.29.0/spec/extensions/pg_timestamptz_spec.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/sequel-5.26.0/spec/extensions/pg_timestamptz_spec.rb
sequel-5.29.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.28.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.27.0 spec/extensions/pg_timestamptz_spec.rb
tdiary-5.1.0 vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_timestamptz_spec.rb
sequel-5.26.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.25.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.24.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.23.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.22.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.21.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.20.0 spec/extensions/pg_timestamptz_spec.rb
tdiary-5.0.13 vendor/bundle/gems/sequel-5.18.0/spec/extensions/pg_timestamptz_spec.rb
sequel-5.19.0 spec/extensions/pg_timestamptz_spec.rb
tdiary-5.0.12.1 vendor/bundle/gems/sequel-5.18.0/spec/extensions/pg_timestamptz_spec.rb
sequel-5.18.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.17.0 spec/extensions/pg_timestamptz_spec.rb
sequel-5.16.0 spec/extensions/pg_timestamptz_spec.rb