Skip to content

Commit

Permalink
Update gems and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiIto committed Mar 23, 2024
1 parent af8f968 commit 21d002a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
26 changes: 15 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -261,6 +264,7 @@ GEM
PLATFORMS
-darwin-20
arm64-darwin-21
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand Down
10 changes: 9 additions & 1 deletion test/act_as_fire_record_beta_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 21d002a

Please sign in to comment.