From 21d002aed879649b1f56ce06cae91030a4ae8f39 Mon Sep 17 00:00:00 2001 From: Junichi Ito Date: Sat, 23 Mar 2024 14:29:20 +0900 Subject: [PATCH] Update gems and tests --- Gemfile.lock | 26 +++++++++++++++----------- test/act_as_fire_record_beta_test.rb | 10 +++++++++- test/test_helper.rb | 6 +++--- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8e27357..8bb0753 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,14 +129,14 @@ GEM google-cloud-location (0.6.0) gapic-common (>= 0.20.0, < 2.a) google-cloud-errors (~> 1.0) - google-protobuf (3.25.1) - google-protobuf (3.25.1-arm64-darwin) - google-protobuf (3.25.1-x86_64-linux) + google-protobuf (3.25.3) + google-protobuf (3.25.3-arm64-darwin) + google-protobuf (3.25.3-x86_64-linux) googleapis-common-protos (1.4.0) google-protobuf (~> 3.14) googleapis-common-protos-types (~> 1.2) grpc (~> 1.27) - googleapis-common-protos-types (1.11.0) + googleapis-common-protos-types (1.14.0) google-protobuf (~> 3.18) googleauth (1.9.1) faraday (>= 1.0, < 3.a) @@ -145,13 +145,13 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) - grpc (1.60.0) + grpc (1.62.0) google-protobuf (~> 3.25) googleapis-common-protos-types (~> 1.0) - grpc (1.60.0-arm64-darwin) + grpc (1.62.0-arm64-darwin) google-protobuf (~> 3.25) googleapis-common-protos-types (~> 1.0) - grpc (1.60.0-x86_64-linux) + grpc (1.62.0-x86_64-linux) google-protobuf (~> 3.25) googleapis-common-protos-types (~> 1.0) i18n (1.14.1) @@ -185,12 +185,12 @@ GEM net-smtp (0.4.0) net-protocol nio4r (2.7.0) - nokogiri (1.15.5) + nokogiri (1.16.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.5-arm64-darwin) + nokogiri (1.16.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.5-x86_64-linux) + nokogiri (1.16.3-x86_64-linux) racc (~> 1.4) os (1.1.4) psych (5.1.2) @@ -246,7 +246,10 @@ GEM faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - sqlite3 (1.4.2) + sqlite3 (1.7.3) + mini_portile2 (~> 2.8.0) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86_64-linux) stringio (3.1.0) thor (1.3.0) timeout (0.4.1) @@ -261,6 +264,7 @@ GEM PLATFORMS -darwin-20 arm64-darwin-21 + arm64-darwin-23 x86_64-linux DEPENDENCIES diff --git a/test/act_as_fire_record_beta_test.rb b/test/act_as_fire_record_beta_test.rb index f01b2fa..b7f0e3a 100644 --- a/test/act_as_fire_record_beta_test.rb +++ b/test/act_as_fire_record_beta_test.rb @@ -101,8 +101,16 @@ class ActAsFireRecordBetaTest < ActiveSupport::TestCase assert_equal book_1.id, books[1].id end + test 'where + order' do + book_1 = Book.create!(title: 'A Day In The Life', published_on: '2022-12-01'.to_date, page: 200) + Book.create!(title: 'Blackbird', published_on: '2022-12-02'.to_date, page: 210) + + found_book = Book.where(:page, :<=, 210).order(:title).first + assert_equal book_1.id, found_book.id + end + test 'invalid query' do - assert_raises(GRPC::InvalidArgument) { Book.where(:page, :<=, 210).order(:title).first } + assert_raises(GRPC::InvalidArgument) { Book.where(:title, :!=, 'Blackbird').where(:page, :!=, 200).first } end test '.first' do diff --git a/test/test_helper.rb b/test/test_helper.rb index 6b88493..a7dd23b 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -8,8 +8,8 @@ # Load fixtures from the engine if ActiveSupport::TestCase.respond_to?(:fixture_path=) - ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__) - ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path - ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files" + ActiveSupport::TestCase.fixture_paths = [File.expand_path("fixtures", __dir__)] + ActionDispatch::IntegrationTest.fixture_paths = ActiveSupport::TestCase.fixture_paths + ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_paths[0] + "/files" ActiveSupport::TestCase.fixtures :all end