Commit 897249db49026527dae7f39f1a29eeaea8b496e6
1 parent
30d5fdc5
Exists in
master
and in
29 other branches
Added country code to MapsControllerTest
Showing
1 changed file
with
9 additions
and
4 deletions
Show diff stats
test/functional/maps_controller_test.rb
@@ -13,6 +13,7 @@ class MapsControllerTest < ActionController::TestCase | @@ -13,6 +13,7 @@ class MapsControllerTest < ActionController::TestCase | ||
13 | 13 | ||
14 | @profile = create_user('test_profile').person | 14 | @profile = create_user('test_profile').person |
15 | login_as(@profile.identifier) | 15 | login_as(@profile.identifier) |
16 | + | ||
16 | end | 17 | end |
17 | 18 | ||
18 | attr_reader :profile | 19 | attr_reader :profile |
@@ -28,6 +29,10 @@ class MapsControllerTest < ActionController::TestCase | @@ -28,6 +29,10 @@ class MapsControllerTest < ActionController::TestCase | ||
28 | city = 'Santo Afonso' | 29 | city = 'Santo Afonso' |
29 | state = 'Mato Grosso' | 30 | state = 'Mato Grosso' |
30 | 31 | ||
32 | + fast_create(NationalRegion, :name => 'Brasil', | ||
33 | + :national_region_code => 'BR', | ||
34 | + :national_region_type_id => NationalRegionType::COUNTRY) | ||
35 | + | ||
31 | parent_region = fast_create(NationalRegion, :name => state, | 36 | parent_region = fast_create(NationalRegion, :name => state, |
32 | :national_region_code => '35', | 37 | :national_region_code => '35', |
33 | :national_region_type_id => NationalRegionType::STATE) | 38 | :national_region_type_id => NationalRegionType::STATE) |
@@ -38,10 +43,10 @@ class MapsControllerTest < ActionController::TestCase | @@ -38,10 +43,10 @@ class MapsControllerTest < ActionController::TestCase | ||
38 | :parent_national_region_code => parent_region.national_region_code) | 43 | :parent_national_region_code => parent_region.national_region_code) |
39 | 44 | ||
40 | post :edit_location, :profile => profile.identifier, :profile_data => { | 45 | post :edit_location, :profile => profile.identifier, :profile_data => { |
41 | - :address => 'new address', | ||
42 | - :country => 'BR', | ||
43 | - :city => city, | ||
44 | - :state => state | 46 | + :address => 'new address', |
47 | + :country => 'BR', | ||
48 | + :city => city, | ||
49 | + :state => state | ||
45 | } | 50 | } |
46 | 51 | ||
47 | assert_equal national_region_code, Profile['test_profile'].national_region_code | 52 | assert_equal national_region_code, Profile['test_profile'].national_region_code |