Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default numbers test #267

Merged
merged 2 commits into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 build/teamcity-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rbenv rehash
ruby -v

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

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