Skip to content

Commit

Permalink
Make pg_interval spec pass on Rails 4.1
Browse files Browse the repository at this point in the history
This is supposed to check that check_string_typecast_bytesize = false
setting works correctly, it doesn't really matter what specific
type is returned.
  • Loading branch information
jeremyevans committed May 20, 2024
1 parent fed7d18 commit 383d597
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/extensions/pg_interval_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def o.sql_literal(ds) 'v' end

proc{@db.typecast_value(:interval, '1'*1000+' secs')}.must_raise(Sequel::InvalidValue)
@db.check_string_typecast_bytesize = false
@db.typecast_value(:interval, '1'*1000+' secs').must_be_kind_of ActiveSupport::Duration
secs = '1'*1000
@db.typecast_value(:interval, secs+' secs').to_i.must_equal secs.to_i
end

it "should return correct results for Database#schema_type_class" do
Expand Down

0 comments on commit 383d597

Please sign in to comment.