Skip to content

Commit

Permalink
Fix default numbers test
Browse files Browse the repository at this point in the history
This patch fixes the default numbers test to expect the correct result
after cockroachdb/cockroach#102299 was merged.
  • Loading branch information
andyyang890 committed May 26, 2023
1 parent 56616ad commit 5d7db21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 7.0.2 - 2023-05-23

- Fix default numbers test to expect the correct result after
https://github.com/cockroachdb/cockroach/pull/102299 was merged.

## 7.0.1 - 2023-03-24

- Reconnect on retryable connection errors.
Expand Down
2 changes: 1 addition & 1 deletion lib/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ActiveRecord
COCKROACH_DB_ADAPTER_VERSION = "7.0.1"
COCKROACH_DB_ADAPTER_VERSION = "7.0.2"
end
4 changes: 2 additions & 2 deletions test/cases/defaults_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class DefaultNumber < ActiveRecord::Base; end
@connection.drop_table :default_numbers, if_exists: true
end

def test_default_decimal_number_in_scientific_notation
def test_default_decimal_zero_with_large_scale
record = DefaultNumber.new
assert_equal 0.0, record.decimal_number
assert_equal "0.0", record.decimal_number_before_type_cast
assert_equal "0.0000000000000000", record.decimal_number_before_type_cast
end
end
end

0 comments on commit 5d7db21

Please sign in to comment.