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.
@@ -1,47 +0,0 @@
1
- in_known_region:
2
- id: 1
3
- addressable_id: 1
4
- addressable_type: Company
5
- street_1: 123 Fake Street
6
- city: Palo Alto
7
- region_id: 3181
8
- country_id: null
9
- postal_code: 94306
10
- created_at: <%= Time.now.to_s(:db) %>
11
- updated_at: <%= Time.now.to_s(:db) %>
12
-
13
- in_unknown_region:
14
- id: 2
15
- addressable_id: 1
16
- addressable_type: Company
17
- street_1: 123 Fake Street
18
- city: Somewhere
19
- custom_region: Anywhere
20
- postal_code: 12345
21
- country_id: 124
22
- created_at: <%= Time.now.to_s(:db) %>
23
- updated_at: <%= Time.now.to_s(:db) %>
24
-
25
- google_headquarters:
26
- id: 3
27
- addressable_id: 2
28
- addressable_type: Company
29
- street_1: 1600 Amphitheatre Parkway
30
- city: Mountain View
31
- region_id: 3181
32
- postal_code: 94043
33
- created_at: <%= Time.now.to_s(:db) %>
34
- updated_at: <%= Time.now.to_s(:db) %>
35
- kind: headquarters
36
-
37
- google_sales:
38
- id: 4
39
- addressable_id: 2
40
- addressable_type: Company
41
- street_1: 604 Arizona Avenue
42
- city: Santa Monica
43
- region_id: 3181
44
- postal_code: 90401
45
- created_at: <%= Time.now.to_s(:db) %>
46
- updated_at: <%= Time.now.to_s(:db) %>
47
- kind: sales
@@ -1,7 +0,0 @@
1
- abc_inc:
2
- id: 1
3
- name: Abc Inc.
4
-
5
- google:
6
- id: 2
7
- name: Google
@@ -1,12 +0,0 @@
1
- united_states:
2
- id: 840
3
- name: United States
4
- official_name: United States of America
5
- alpha_2_code: US
6
- alpha_3_code: USA
7
-
8
- canada:
9
- id: 124
10
- name: Canada
11
- alpha_2_code: CA
12
- alpha_3_code: CAN
@@ -1,5 +0,0 @@
1
- california:
2
- id: 3181
3
- country_id: 840
4
- name: California
5
- abbreviation: CA
@@ -1,15 +0,0 @@
1
- require "#{File.dirname(__FILE__)}/../test_helper"
2
-
3
- class HasAddresses < Test::Unit::TestCase
4
- fixtures :companies, :addresses
5
-
6
- def test_should_create_one_association
7
- assert_equal addresses(:google_headquarters), companies(:google).headquarters_address
8
- assert_equal addresses(:google_sales), companies(:google).sales_address
9
- end
10
-
11
- def test_should_create_many_association
12
- assert_equal 2, companies(:google).addresses.size
13
- assert_equal [addresses(:google_headquarters), addresses(:google_sales)], companies(:google).addresses
14
- end
15
- end