]> git.openstreetmap.org Git - rails.git/blob - test/lib/country_test.rb
Add frozen_string_literal comments to ruby files
[rails.git] / test / lib / country_test.rb
1 # frozen_string_literal: true
2
3 require "test_helper"
4
5 class CountryTest < ActiveSupport::TestCase
6   def test_gb
7     gb = Country.find("GB")
8     assert_not_nil gb
9     assert_equal "GB", gb.code
10     assert_in_delta(-8.623555, gb.min_lon)
11     assert_in_delta(59.360249, gb.max_lat)
12     assert_in_delta(1.759, gb.max_lon)
13     assert_in_delta(49.906193, gb.min_lat)
14   end
15
16   def test_au
17     au = Country.find("AU")
18     assert_not_nil au
19     assert_equal "AU", au.code
20     assert_in_delta(112.911057, au.min_lon)
21     assert_in_delta(-10.062805, au.max_lat)
22     assert_in_delta(153.639252, au.max_lon)
23     assert_in_delta(-43.64397, au.min_lat)
24   end
25
26   def test_xx
27     xx = Country.find("XX")
28     assert_nil xx
29   end
30 end