Skip to content

Commit

Permalink
Update SRID assertion in tasks_test.rb for MySQL version compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff.dean committed Mar 4, 2025
1 parent 4870429 commit a4d7c39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/tasks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ def test_basic_geography_schema_dump
ActiveRecord::SchemaDumper.dump(connection, file)
end
data = File.read(tmp_sql_filename)
assert_includes data, %(t.geometry "latlon1", limit: {:type=>"point", :srid=>0})
if connection.database_version >= "8.0.0"
assert_includes data, %(t.geometry "latlon1", limit: {:type=>"point", :srid=>4326})
else
assert_includes data, %(t.geometry "latlon1", limit: {:type=>"point", :srid=>0})
end
if connection.supports_index_sort_order?
assert_includes(data,
%(t.geometry "latlon2", limit: {:type=>"point", :srid=>4326}))
Expand Down

0 comments on commit a4d7c39

Please sign in to comment.