From 70d7d8d850148f714b70a3297c02a8203214dec6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 22 Apr 2021 19:20:25 +0100 Subject: [PATCH] Fix some ruby 3 compatibility issues --- test/models/diary_entry_test.rb | 10 +++++----- test/models/trace_test.rb | 12 ++++++------ test/models/tracetag_test.rb | 4 ++-- test/test_helper.rb | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/models/diary_entry_test.rb b/test/models/diary_entry_test.rb index 2b94d04dd..eb794acec 100644 --- a/test/models/diary_entry_test.rb +++ b/test/models/diary_entry_test.rb @@ -9,16 +9,16 @@ class DiaryEntryTest < ActiveSupport::TestCase def test_diary_entry_validations diary_entry_valid({}) diary_entry_valid({ :title => "" }, :valid => false) - diary_entry_valid(:title => "a" * 255) + diary_entry_valid({ :title => "a" * 255 }) diary_entry_valid({ :title => "a" * 256 }, :valid => false) diary_entry_valid({ :body => "" }, :valid => false) - diary_entry_valid(:latitude => 90) + diary_entry_valid({ :latitude => 90 }) diary_entry_valid({ :latitude => 90.00001 }, :valid => false) - diary_entry_valid(:latitude => -90) + diary_entry_valid({ :latitude => -90 }) diary_entry_valid({ :latitude => -90.00001 }, :valid => false) - diary_entry_valid(:longitude => 180) + diary_entry_valid({ :longitude => 180 }) diary_entry_valid({ :longitude => 180.00001 }, :valid => false) - diary_entry_valid(:longitude => -180) + diary_entry_valid({ :longitude => -180 }) diary_entry_valid({ :longitude => -180.00001 }, :valid => false) end diff --git a/test/models/trace_test.rb b/test/models/trace_test.rb index fc5064ad7..9682d6b28 100644 --- a/test/models/trace_test.rb +++ b/test/models/trace_test.rb @@ -77,15 +77,15 @@ class TraceTest < ActiveSupport::TestCase def test_validations trace_valid({}) trace_valid({ :user_id => nil }, :valid => false) - trace_valid(:name => "a" * 255) + trace_valid({ :name => "a" * 255 }) trace_valid({ :name => "a" * 256 }, :valid => false) trace_valid({ :description => nil }, :valid => false) - trace_valid(:description => "a" * 255) + trace_valid({ :description => "a" * 255 }) trace_valid({ :description => "a" * 256 }, :valid => false) - trace_valid(:visibility => "private") - trace_valid(:visibility => "public") - trace_valid(:visibility => "trackable") - trace_valid(:visibility => "identifiable") + trace_valid({ :visibility => "private" }) + trace_valid({ :visibility => "public" }) + trace_valid({ :visibility => "trackable" }) + trace_valid({ :visibility => "identifiable" }) trace_valid({ :visibility => "foo" }, :valid => false) end diff --git a/test/models/tracetag_test.rb b/test/models/tracetag_test.rb index 1aaa596d2..0d2b17953 100644 --- a/test/models/tracetag_test.rb +++ b/test/models/tracetag_test.rb @@ -5,8 +5,8 @@ class TracetagTest < ActiveSupport::TestCase tracetag_valid({}) tracetag_valid({ :tag => nil }, :valid => false) tracetag_valid({ :tag => "" }, :valid => false) - tracetag_valid(:tag => "a") - tracetag_valid(:tag => "a" * 255) + tracetag_valid({ :tag => "a" }) + tracetag_valid({ :tag => "a" * 255 }) tracetag_valid({ :tag => "a" * 256 }, :valid => false) tracetag_valid({ :tag => "a/b" }, :valid => false) tracetag_valid({ :tag => "a;b" }, :valid => false) diff --git a/test/test_helper.rb b/test/test_helper.rb index da36be28b..a6147ef29 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -160,7 +160,7 @@ module ActiveSupport request.sign!(oauth) - method(method).call(request.signed_uri, options) + method(method).call(request.signed_uri, **options) end ## -- 2.39.5