has_addresses 0.0.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +50 -0
- data/{MIT-LICENSE → LICENSE} +2 -2
- data/README.rdoc +63 -0
- data/Rakefile +48 -41
- data/app/models/address.rb +92 -50
- data/app/models/country.rb +287 -101
- data/app/models/region.rb +5378 -106
- data/db/migrate/001_create_countries.rb +7 -7
- data/db/migrate/002_create_regions.rb +7 -5
- data/db/migrate/003_create_addresses.rb +10 -12
- data/lib/has_addresses.rb +9 -68
- data/test/app_root/app/models/company.rb +1 -5
- data/test/app_root/config/environment.rb +6 -19
- data/test/app_root/db/migrate/001_create_companies.rb +1 -1
- data/test/app_root/db/migrate/002_migrate_has_addresses_to_version_3.rb +13 -0
- data/test/factory.rb +68 -0
- data/test/functional/has_addresses_test.rb +22 -0
- data/test/test_helper.rb +11 -5
- data/test/unit/address_test.rb +210 -79
- data/test/unit/country_test.rb +101 -72
- data/test/unit/region_test.rb +104 -61
- metadata +70 -61
- data/CHANGELOG +0 -23
- data/README +0 -122
- data/tasks/has_addresses_tasks.rake +0 -23
- data/test/app_root/db/migrate/002_add_address_kinds.rb +0 -9
- data/test/files/iso_3166.xml +0 -1719
- data/test/files/iso_3166_2.xml +0 -8617
- data/test/fixtures/addresses.yml +0 -47
- data/test/fixtures/companies.yml +0 -7
- data/test/fixtures/countries.yml +0 -12
- data/test/fixtures/regions.yml +0 -5
- data/test/unit/has_addresses_test.rb +0 -15
data/test/unit/address_test.rb
CHANGED
@@ -1,171 +1,302 @@
|
|
1
1
|
require "#{File.dirname(__FILE__)}/../test_helper"
|
2
2
|
|
3
|
-
class
|
4
|
-
|
3
|
+
class AddressByDefaultTest < ActiveRecord::TestCase
|
4
|
+
def setup
|
5
|
+
@address = Address.new
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_should_not_have_an_addressable_id
|
9
|
+
assert_nil @address.addressable_id
|
10
|
+
end
|
5
11
|
|
6
|
-
def
|
7
|
-
|
12
|
+
def test_should_not_have_an_addressable_type
|
13
|
+
assert @address.addressable_type.blank?
|
8
14
|
end
|
9
15
|
|
10
|
-
def
|
11
|
-
|
16
|
+
def test_should_not_have_a_street_1
|
17
|
+
assert @address.street_1.blank?
|
12
18
|
end
|
13
19
|
|
14
|
-
def
|
15
|
-
|
20
|
+
def test_should_not_have_a_street_2
|
21
|
+
assert @address.street_2.blank?
|
16
22
|
end
|
17
23
|
|
18
|
-
def
|
19
|
-
|
24
|
+
def test_should_not_have_a_city
|
25
|
+
assert @address.city.blank?
|
20
26
|
end
|
21
27
|
|
22
|
-
def
|
23
|
-
|
28
|
+
def test_should_not_have_a_region
|
29
|
+
assert_nil @address.region_id
|
24
30
|
end
|
25
31
|
|
26
|
-
def
|
27
|
-
|
32
|
+
def test_should_not_have_a_custom_region
|
33
|
+
assert @address.custom_region.blank?
|
28
34
|
end
|
29
35
|
|
30
|
-
def
|
31
|
-
|
36
|
+
def test_should_not_have_a_region_name
|
37
|
+
assert @address.region_name.blank?
|
32
38
|
end
|
33
39
|
|
34
|
-
def
|
35
|
-
|
40
|
+
def test_should_not_have_a_postal_code
|
41
|
+
assert @address.postal_code.blank?
|
36
42
|
end
|
37
43
|
|
38
|
-
def
|
39
|
-
|
44
|
+
def test_should_not_have_a_country
|
45
|
+
assert_nil @address.country_id
|
40
46
|
end
|
41
47
|
|
42
|
-
def
|
43
|
-
|
48
|
+
def test_should_not_have_any_address_lines
|
49
|
+
assert @address.multi_line.empty?
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
class AddressTest < ActiveRecord::TestCase
|
54
|
+
def test_should_be_valid_with_a_set_of_valid_attributes
|
55
|
+
address = new_address
|
56
|
+
assert address.valid?
|
44
57
|
end
|
45
58
|
|
46
|
-
def
|
47
|
-
|
59
|
+
def test_should_require_an_addressable_id
|
60
|
+
address = new_address(:addressable => nil)
|
61
|
+
assert !address.valid?
|
62
|
+
assert address.errors.invalid?(:addressable_id)
|
48
63
|
end
|
49
64
|
|
50
|
-
def
|
51
|
-
|
65
|
+
def test_should_require_an_addressable_type
|
66
|
+
address = new_address(:addressable => nil)
|
67
|
+
assert !address.valid?
|
68
|
+
assert address.errors.invalid?(:addressable_type)
|
52
69
|
end
|
53
70
|
|
54
|
-
def
|
55
|
-
|
71
|
+
def test_should_require_a_street_1
|
72
|
+
address = new_address(:street_1 => nil)
|
73
|
+
assert !address.valid?
|
74
|
+
assert address.errors.invalid?(:street_1)
|
56
75
|
end
|
57
76
|
|
58
|
-
def
|
59
|
-
|
77
|
+
def test_should_not_require_a_street_2
|
78
|
+
address = new_address(:street_2 => nil)
|
79
|
+
assert address.valid?
|
60
80
|
end
|
61
81
|
|
62
|
-
def
|
63
|
-
|
82
|
+
def test_should_require_a_city
|
83
|
+
address = new_address(:city => nil)
|
84
|
+
assert !address.valid?
|
85
|
+
assert address.errors.invalid?(:city)
|
64
86
|
end
|
65
87
|
|
66
|
-
def
|
67
|
-
|
68
|
-
|
69
|
-
|
88
|
+
def test_should_require_a_postal_code
|
89
|
+
address = new_address(:postal_code => nil)
|
90
|
+
assert !address.valid?
|
91
|
+
assert address.errors.invalid?(:postal_code)
|
70
92
|
end
|
71
93
|
|
72
|
-
def
|
73
|
-
|
74
|
-
|
75
|
-
|
94
|
+
def test_should_require_a_region_if_country_has_regions
|
95
|
+
country = create_country
|
96
|
+
create_region(:country => country)
|
97
|
+
|
98
|
+
address = new_address(:country => country, :region => nil)
|
99
|
+
assert !address.valid?
|
100
|
+
assert address.errors.invalid?(:region_id)
|
76
101
|
end
|
77
102
|
|
78
|
-
def
|
79
|
-
|
80
|
-
address.country = countries(:united_states)
|
103
|
+
def test_should_not_require_a_region_if_country_has_no_regions
|
104
|
+
country = create_country
|
81
105
|
|
82
|
-
|
83
|
-
address.
|
84
|
-
assert_nil address.country_id
|
106
|
+
address = new_address(:country => country, :region => nil, :custom_region => 'Somewhere')
|
107
|
+
assert address.valid?
|
85
108
|
end
|
86
109
|
|
87
|
-
def
|
88
|
-
|
89
|
-
address.custom_region = 'Somewhere'
|
110
|
+
def test_should_require_a_custom_region_if_country_has_no_regions
|
111
|
+
country = create_country
|
90
112
|
|
91
|
-
|
92
|
-
address.
|
93
|
-
|
113
|
+
address = new_address(:country => country, :region => nil, :custom_region => nil)
|
114
|
+
assert !address.valid?
|
115
|
+
assert address.errors.invalid?(:custom_region)
|
116
|
+
end
|
117
|
+
|
118
|
+
def test_should_not_require_a_custom_region_if_country_has_regions
|
119
|
+
country = create_country
|
120
|
+
region = create_region(:country => country)
|
121
|
+
|
122
|
+
address = new_address(:country => country, :region => region, :custom_region => nil)
|
123
|
+
assert address.valid?
|
124
|
+
end
|
125
|
+
|
126
|
+
def test_should_require_a_country
|
127
|
+
address = new_address(:country => nil, :region => nil)
|
128
|
+
assert !address.valid?
|
129
|
+
assert address.errors.invalid?(:country_id)
|
130
|
+
end
|
131
|
+
|
132
|
+
def test_should_protect_attributes_from_mass_assignment
|
133
|
+
country = create_country
|
134
|
+
region = create_region(:country => country)
|
135
|
+
|
136
|
+
address = Address.new(
|
137
|
+
:id => 1,
|
138
|
+
:addressable_id => 1,
|
139
|
+
:addressable_type => 'User',
|
140
|
+
:street_1 => '1600 Amphitheatre Parkway',
|
141
|
+
:street_2 => 'Apt. 1',
|
142
|
+
:city => 'Mountain View',
|
143
|
+
:region => region,
|
144
|
+
:custom_region => 'Anywhere',
|
145
|
+
:postal_code => '94043',
|
146
|
+
:country => country
|
147
|
+
)
|
148
|
+
|
149
|
+
assert_nil address.id
|
150
|
+
assert_nil address.addressable_id
|
151
|
+
assert address.addressable_type.blank?
|
152
|
+
assert_equal '1600 Amphitheatre Parkway', address.street_1
|
153
|
+
assert_equal 'Apt. 1', address.street_2
|
154
|
+
assert_equal 'Mountain View', address.city
|
155
|
+
assert_equal region, address.region
|
156
|
+
assert_equal 'Anywhere', address.custom_region
|
157
|
+
assert_equal '94043', address.postal_code
|
158
|
+
assert_equal country, address.country
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
class AddressAfterBeingCreatedTest < ActiveRecord::TestCase
|
163
|
+
def setup
|
164
|
+
@company = create_company
|
165
|
+
@address = create_address(:addressable => @company)
|
166
|
+
end
|
167
|
+
|
168
|
+
def test_should_have_an_addressable_association
|
169
|
+
assert_equal @company, @address.addressable
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
class AddressInKnownRegionTest < ActiveRecord::TestCase
|
174
|
+
def setup
|
175
|
+
@country = create_country
|
176
|
+
@region = create_region(:country => @country, :name => 'California')
|
177
|
+
@address = create_address(:region => @region)
|
94
178
|
end
|
95
179
|
|
96
|
-
def
|
97
|
-
|
180
|
+
def test_should_have_a_region
|
181
|
+
assert_not_nil @address.region
|
98
182
|
end
|
99
183
|
|
100
|
-
def
|
101
|
-
assert_equal '
|
184
|
+
def test_should_have_a_region_name
|
185
|
+
assert_equal 'California', @address.region_name
|
102
186
|
end
|
103
187
|
|
104
|
-
def
|
105
|
-
|
106
|
-
|
107
|
-
|
188
|
+
def test_should_have_a_country
|
189
|
+
assert_equal @country, @address.country
|
190
|
+
end
|
191
|
+
|
192
|
+
def test_should_clear_custom_region
|
193
|
+
@address.custom_region = 'Somewhere'
|
194
|
+
@address.valid?
|
195
|
+
assert_nil @address.custom_region
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
class AddressInUnknownRegionTest < ActiveRecord::TestCase
|
200
|
+
def setup
|
201
|
+
@country = create_country
|
202
|
+
@address = create_address(:country => @country, :region => nil, :custom_region => 'Somewhere')
|
203
|
+
end
|
204
|
+
|
205
|
+
def test_should_not_have_a_region
|
206
|
+
assert_nil @address.region
|
207
|
+
end
|
208
|
+
|
209
|
+
def test_should_have_a_country
|
210
|
+
assert_equal @country, @address.country
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_should_have_a_region_name
|
214
|
+
assert_equal 'Somewhere', @address.region_name
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
class AddressConstructionTest < ActiveRecord::TestCase
|
219
|
+
def setup
|
220
|
+
@country = create_country(:alpha_2_code => 'US', :name => 'United States')
|
221
|
+
@region = create_region(:country => @country, :abbreviation => 'CA', :name => 'California')
|
222
|
+
end
|
223
|
+
|
224
|
+
def test_should_construct_multiline_based_on_current_information
|
225
|
+
address = Address.new
|
226
|
+
address.street_1 = '123 Fake Street'
|
227
|
+
assert_equal ['123 Fake Street'], address.multi_line
|
108
228
|
|
109
|
-
|
229
|
+
address.street_2 = 'Apartment 456'
|
110
230
|
expected = [
|
111
231
|
'123 Fake Street',
|
112
232
|
'Apartment 456'
|
113
233
|
]
|
114
|
-
assert_equal expected,
|
234
|
+
assert_equal expected, address.multi_line
|
115
235
|
|
116
|
-
|
236
|
+
address.city = 'Somewhere'
|
117
237
|
expected = [
|
118
238
|
'123 Fake Street',
|
119
239
|
'Apartment 456',
|
120
240
|
'Somewhere'
|
121
241
|
]
|
122
|
-
assert_equal expected,
|
242
|
+
assert_equal expected, address.multi_line
|
123
243
|
|
124
|
-
|
244
|
+
address.region = @region
|
245
|
+
address.country = @country
|
125
246
|
expected = [
|
126
247
|
'123 Fake Street',
|
127
248
|
'Apartment 456',
|
128
249
|
'Somewhere, California',
|
129
250
|
'United States'
|
130
251
|
]
|
131
|
-
assert_equal expected,
|
252
|
+
assert_equal expected, address.multi_line
|
132
253
|
|
133
|
-
|
254
|
+
address.postal_code = '12345'
|
134
255
|
expected = [
|
135
256
|
'123 Fake Street',
|
136
257
|
'Apartment 456',
|
137
258
|
'Somewhere, California 12345',
|
138
259
|
'United States'
|
139
260
|
]
|
140
|
-
assert_equal expected,
|
261
|
+
assert_equal expected, address.multi_line
|
262
|
+
|
263
|
+
address.region = nil
|
264
|
+
address.custom_region = 'Anywhere'
|
265
|
+
expected = [
|
266
|
+
'123 Fake Street',
|
267
|
+
'Apartment 456',
|
268
|
+
'Somewhere, Anywhere 12345',
|
269
|
+
'United States'
|
270
|
+
]
|
271
|
+
assert_equal expected, address.multi_line
|
141
272
|
|
142
|
-
|
143
|
-
a.custom_region = 'Anywhere'
|
273
|
+
address.country = nil
|
144
274
|
expected = [
|
145
275
|
'123 Fake Street',
|
146
276
|
'Apartment 456',
|
147
277
|
'Somewhere, Anywhere 12345'
|
148
278
|
]
|
149
|
-
assert_equal expected,
|
279
|
+
assert_equal expected, address.multi_line
|
150
280
|
|
151
|
-
|
281
|
+
address.city = nil
|
152
282
|
expected = [
|
153
283
|
'123 Fake Street',
|
154
284
|
'Apartment 456',
|
155
285
|
'Anywhere 12345'
|
156
286
|
]
|
157
|
-
assert_equal expected,
|
287
|
+
assert_equal expected, address.multi_line
|
158
288
|
|
159
|
-
|
289
|
+
address.postal_code = nil
|
160
290
|
expected = [
|
161
291
|
'123 Fake Street',
|
162
292
|
'Apartment 456',
|
163
293
|
'Anywhere'
|
164
294
|
]
|
165
|
-
assert_equal expected,
|
166
|
-
|
295
|
+
assert_equal expected, address.multi_line
|
296
|
+
end
|
167
297
|
|
168
|
-
def
|
169
|
-
|
298
|
+
def test_should_construct_single_line_based_on_current_information
|
299
|
+
address = create_address(:street_1 => '1600 Amphitheatre Parkway', :city => 'Mountain View', :region => @region, :postal_code => '94043')
|
300
|
+
assert_equal '1600 Amphitheatre Parkway, Mountain View, California 94043, United States', address.single_line
|
170
301
|
end
|
171
|
-
end
|
302
|
+
end
|
data/test/unit/country_test.rb
CHANGED
@@ -1,119 +1,148 @@
|
|
1
1
|
require "#{File.dirname(__FILE__)}/../test_helper"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
class CountryTest < Test::Unit::TestCase
|
8
|
-
fixtures :countries, :regions
|
9
|
-
|
10
|
-
def test_should_download_and_parse_countries_from_iso_standard
|
11
|
-
countries = Country.download_all
|
12
|
-
assert_instance_of Array, countries
|
13
|
-
assert !countries.empty?
|
3
|
+
class CountryByDefaultTest < ActiveRecord::TestCase
|
4
|
+
def setup
|
5
|
+
@country = Country.new
|
14
6
|
end
|
15
7
|
|
16
|
-
def
|
17
|
-
country
|
18
|
-
assert !country.new_record?
|
19
|
-
Country.bootstrap
|
20
|
-
assert_nil Country.find_by_name('Test')
|
8
|
+
def test_should_not_have_a_name
|
9
|
+
assert_nil @country.name
|
21
10
|
end
|
22
11
|
|
23
|
-
def
|
24
|
-
|
25
|
-
assert Country.count > 2
|
12
|
+
def test_should_not_have_an_official_name
|
13
|
+
assert_nil @country.official_name
|
26
14
|
end
|
27
15
|
|
28
|
-
def
|
29
|
-
|
16
|
+
def test_should_not_have_an_alpha_2_code
|
17
|
+
assert_nil @country.alpha_2_code
|
30
18
|
end
|
31
19
|
|
32
|
-
def
|
33
|
-
|
34
|
-
assert File.exists?("#{RAILS_ROOT}/db/bootstrap/countries.yml")
|
20
|
+
def test_should_not_have_an_alpha_3_code
|
21
|
+
assert_nil @country.alpha_3_code
|
35
22
|
end
|
36
23
|
|
37
|
-
def
|
38
|
-
Country.
|
39
|
-
|
24
|
+
def test_should_use_name_for_official_name
|
25
|
+
country = Country.new(:name => 'United States')
|
26
|
+
assert_equal 'United States', country.official_name
|
40
27
|
end
|
41
28
|
|
42
|
-
def
|
43
|
-
Country.
|
44
|
-
|
45
|
-
assert Country.count > 2
|
29
|
+
def test_should_not_use_name_for_official_name_if_specified
|
30
|
+
country = Country.new(:official_name => nil)
|
31
|
+
assert_nil country.official_name
|
46
32
|
end
|
47
|
-
|
48
|
-
|
49
|
-
|
33
|
+
end
|
34
|
+
|
35
|
+
class CountryTest < ActiveRecord::TestCase
|
36
|
+
def test_should_be_valid_with_a_set_of_valid_attributes
|
37
|
+
country = new_country
|
38
|
+
assert country.valid?
|
50
39
|
end
|
51
40
|
|
52
|
-
def
|
53
|
-
|
41
|
+
def test_should_require_a_name
|
42
|
+
country = new_country(:name => nil)
|
43
|
+
assert !country.valid?
|
44
|
+
assert country.errors.invalid?(:name)
|
54
45
|
end
|
55
46
|
|
56
|
-
def
|
57
|
-
|
58
|
-
|
47
|
+
def test_should_not_require_an_official_name
|
48
|
+
country = new_country(:official_name => nil)
|
49
|
+
assert country.valid?
|
59
50
|
end
|
60
51
|
|
61
|
-
def
|
62
|
-
|
52
|
+
def test_should_require_an_alpha_2_code
|
53
|
+
country = new_country(:alpha_2_code => nil)
|
54
|
+
assert !country.valid?
|
55
|
+
assert country.errors.invalid?(:alpha_2_code)
|
63
56
|
end
|
64
57
|
|
65
|
-
def
|
66
|
-
|
58
|
+
def test_should_require_a_unique_alpha_2_code
|
59
|
+
create_country(:alpha_2_code => 'US')
|
60
|
+
|
61
|
+
country = new_country(:alpha_2_code => 'US')
|
62
|
+
assert !country.valid?
|
63
|
+
assert country.errors.invalid?(:alpha_2_code)
|
67
64
|
end
|
68
65
|
|
69
|
-
def
|
70
|
-
|
71
|
-
|
66
|
+
def test_should_not_allow_alpha_2_codes_shorter_or_longer_than_2_characters
|
67
|
+
country = new_country(:alpha_2_code => 'a')
|
68
|
+
assert !country.valid?
|
69
|
+
assert country.errors.invalid?(:alpha_2_code)
|
70
|
+
|
71
|
+
country.alpha_2_code += 'a'
|
72
|
+
assert country.valid?
|
73
|
+
|
74
|
+
country.alpha_2_code += 'a'
|
75
|
+
assert !country.valid?
|
76
|
+
assert country.errors.invalid?(:alpha_2_code)
|
72
77
|
end
|
73
78
|
|
74
|
-
def
|
75
|
-
|
79
|
+
def test_should_require_an_alpha_3_code
|
80
|
+
country = new_country(:alpha_3_code => nil)
|
81
|
+
assert !country.valid?
|
82
|
+
assert country.errors.invalid?(:alpha_3_code)
|
76
83
|
end
|
77
84
|
|
78
|
-
def
|
79
|
-
|
85
|
+
def test_should_not_allow_alpha_3_codes_shorter_or_longer_than_3_characters
|
86
|
+
country = new_country(:alpha_3_code => 'aa')
|
87
|
+
assert !country.valid?
|
88
|
+
assert country.errors.invalid?(:alpha_3_code)
|
89
|
+
|
90
|
+
country.alpha_3_code += 'a'
|
91
|
+
assert country.valid?
|
92
|
+
|
93
|
+
country.alpha_3_code += 'a'
|
94
|
+
assert !country.valid?
|
95
|
+
assert country.errors.invalid?(:alpha_3_code)
|
80
96
|
end
|
81
97
|
|
82
|
-
def
|
83
|
-
|
84
|
-
|
98
|
+
def test_should_use_alpha_2_code_for_abbreviation_2
|
99
|
+
country = new_country(:alpha_2_code => 'US')
|
100
|
+
assert_equal 'US', country.abbreviation_2
|
85
101
|
end
|
86
102
|
|
87
|
-
def
|
88
|
-
|
103
|
+
def test_should_use_alpha_3_code_for_abbreviation_3
|
104
|
+
country = new_country(:alpha_3_code => 'USA')
|
105
|
+
assert_equal 'USA', country.abbreviation_3
|
89
106
|
end
|
90
107
|
|
91
|
-
def
|
92
|
-
|
108
|
+
def test_should_use_alpha_2_code_for_stringification
|
109
|
+
country = new_country(:alpha_2_code => 'US')
|
110
|
+
assert_equal 'US', country.to_s
|
93
111
|
end
|
94
|
-
|
95
|
-
|
96
|
-
|
112
|
+
end
|
113
|
+
|
114
|
+
class CountryAfterBeingCreatedTest < ActiveRecord::TestCase
|
115
|
+
def setup
|
116
|
+
@country = create_country
|
97
117
|
end
|
98
118
|
|
99
|
-
def
|
100
|
-
|
119
|
+
def test_should_not_have_any_regions
|
120
|
+
assert @country.regions.empty?
|
101
121
|
end
|
102
122
|
|
103
|
-
def
|
104
|
-
|
123
|
+
def test_should_not_have_any_addresses
|
124
|
+
assert @country.addresses.empty?
|
105
125
|
end
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
126
|
+
end
|
127
|
+
|
128
|
+
class CountryWithRegionsTest < ActiveRecord::TestCase
|
129
|
+
def setup
|
130
|
+
@country = create_country
|
131
|
+
@region = create_region(:country => @country)
|
110
132
|
end
|
111
133
|
|
112
|
-
def
|
113
|
-
assert_equal [
|
134
|
+
def test_should_have_regions
|
135
|
+
assert_equal [@region], @country.regions
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class CountryWithAddressesTest < ActiveRecord::TestCase
|
140
|
+
def setup
|
141
|
+
@country = create_country
|
142
|
+
@address = create_address(:country => @country)
|
114
143
|
end
|
115
144
|
|
116
|
-
def
|
117
|
-
|
145
|
+
def test_should_have_addresses
|
146
|
+
assert_equal [@address], @country.addresses
|
118
147
|
end
|
119
148
|
end
|