Skip to content

Commit be2a6b3

Browse files
authored
Merge pull request #267 from andyyang890/fix_default_numbers
Fix default numbers test
2 parents f2dd3d1 + 5d7db21 commit be2a6b3

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
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.

build/teamcity-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rbenv rehash
1111
ruby -v
1212

1313
# Download CockroachDB
14-
VERSION=v22.2.6
14+
VERSION=v23.1.2
1515
wget -qO- https://binaries.cockroachdb.com/cockroach-$VERSION.linux-amd64.tgz | tar xvz
1616
readonly COCKROACH=./cockroach-$VERSION.linux-amd64/cockroach
1717

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)