Skip to content

Commit 5d7db21

Browse files
committed
Fix default numbers test
This patch fixes the default numbers test to expect the correct result after cockroachdb/cockroach#102299 was merged.
1 parent 56616ad commit 5d7db21

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 7.0.2 - 2023-05-23
4+
5+
- Fix default numbers test to expect the correct result after
6+
https://github.com/cockroachdb/cockroach/pull/102299 was merged.
7+
38
## 7.0.1 - 2023-03-24
49

510
- Reconnect on retryable connection errors.

lib/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module ActiveRecord
4-
COCKROACH_DB_ADAPTER_VERSION = "7.0.1"
4+
COCKROACH_DB_ADAPTER_VERSION = "7.0.2"
55
end

test/cases/defaults_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class DefaultNumber < ActiveRecord::Base; end
3636
@connection.drop_table :default_numbers, if_exists: true
3737
end
3838

39-
def test_default_decimal_number_in_scientific_notation
39+
def test_default_decimal_zero_with_large_scale
4040
record = DefaultNumber.new
4141
assert_equal 0.0, record.decimal_number
42-
assert_equal "0.0", record.decimal_number_before_type_cast
42+
assert_equal "0.0000000000000000", record.decimal_number_before_type_cast
4343
end
4444
end
4545
end

0 commit comments

Comments
 (0)