unidom-geo-china 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df8ffc44c1b04d7976b724d7cbbdca3edb47c5d8
4
- data.tar.gz: d230a71f6933e49cbfc0664e46daf2c55b4d51b3
3
+ metadata.gz: 26f4bb9bbd9b42da25765062f576c42dfd84ae65
4
+ data.tar.gz: 9cdc8de26b0642a4b1928058b17b27209e2c849a
5
5
  SHA512:
6
- metadata.gz: a2e45104d86fc3367d88c06541fdf46388ab521a2d810d776981bfbf9e9f1803c17a712a4a3f06314f8f948427bdac15eafc0db2c16a88287665067180b782ba
7
- data.tar.gz: 973e88869c9d7f8d5233d9b2efe6d91da80718489e9b083a0a3e7087ba48a523b555cb938629777b201b2123933ea4b9743490522ca777d4508448027ab55615
6
+ metadata.gz: 3d4f001bf8a2ec71d6bc87deb6eae159b53d3a9142458edc6b42f13b0f4f8fcbde17a2e8adb4f993babaa571f9e3287b06199add24e1c7435c1508489584a326
7
+ data.tar.gz: 367c1bcbf847cf4ff20865e332389cf5fa626182d377efb587702d8e4f7a275a9db93cc70996a4f970928930035eb1083ba680d374ce8a55fb34899ee13c21bc
@@ -69,6 +69,18 @@ describe Unidom::Geo::China::Region, type: :model do
69
69
  { name: '1'*(name_max_length+1) } => 1,
70
70
  { name: 'A'*(name_max_length+1) } => 1
71
71
 
72
+ town_1_attributes = {
73
+ numeric_code: '1'*9,
74
+ name: 'Some Town #1'
75
+ }
76
+
77
+ town_2_attributes = {
78
+ numeric_code: '2'*9,
79
+ name: 'Some Town #2'
80
+ }
81
+
82
+ it_behaves_like 'has_many', model_attributes, :towns, Unidom::Geo::China::Town, [ town_1_attributes, town_2_attributes ]
83
+
72
84
  end
73
85
 
74
86
  end
@@ -53,6 +53,16 @@ describe Unidom::Geo::China::Town, type: :model do
53
53
  { name: '1'*(name_max_length+1) } => 1,
54
54
  { name: 'A'*(name_max_length+1) } => 1
55
55
 
56
+ region_attributes = {
57
+ scheme_id: SecureRandom.uuid,
58
+ scheme_type: 'Unidom::Geo::China::Scheme::Mock',
59
+ numeric_code: '999999',
60
+ alphabetic_code: 'ZZZ',
61
+ name: 'Some Region'
62
+ }
63
+
64
+ it_behaves_like 'belongs_to', model_attributes, :region, Unidom::Geo::China::Region, region_attributes
65
+
56
66
  end
57
67
 
58
68
  end
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Geo
3
3
  module China
4
- VERSION = '0.5.2'.freeze
4
+ VERSION = '0.5.3'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-geo-china
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-23 00:00:00.000000000 Z
11
+ date: 2017-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-geo