Skip to content

Commit 44c934b

Browse files
committed
Fix broken CI with Rails 8.1
1 parent c20fec1 commit 44c934b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/cases/base_test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,11 @@ def test_collection_url_with_parameters
817817
assert Person.collection_url(name: "Test", student: true).include?("name=Test")
818818
assert Person.collection_url(name: "Test", student: true).include?("student=true")
819819

820-
assert_equal "http://37s.sunrise.i:3000/people.json?name%5B%5D=bob&name%5B%5D=your+uncle%2Bme&name%5B%5D=&name%5B%5D=false", Person.collection_url(name: [ "bob", "your uncle+me", nil, false ])
820+
if ActiveSupport::VERSION::MAJOR < 8 || ActiveSupport::VERSION::MINOR < 1
821+
assert_equal "http://37s.sunrise.i:3000/people.json?name%5B%5D=bob&name%5B%5D=your+uncle%2Bme&name%5B%5D=&name%5B%5D=false", Person.collection_url(name: [ "bob", "your uncle+me", nil, false ])
822+
else
823+
assert_equal "http://37s.sunrise.i:3000/people.json?name%5B%5D=bob&name%5B%5D=your+uncle%2Bme&name%5B%5D&name%5B%5D=false", Person.collection_url(name: [ "bob", "your uncle+me", nil, false ])
824+
end
821825
assert_equal "http://37s.sunrise.i:3000/people.json?struct%5Ba%5D%5B%5D=2&struct%5Ba%5D%5B%5D=1&struct%5Bb%5D=fred", Person.collection_url(struct: { :a => [ 2, 1 ], "b" => "fred" })
822826
end
823827

0 commit comments

Comments
 (0)