unidom-category 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cb0961fd5b681321fcc47a73c980bb3421c5fed
4
- data.tar.gz: 0aa1b2ab6a21fb78db6599fc8210a2510abc2453
3
+ metadata.gz: c5c7dcc861783a84dd34141a3adca54ac7d13048
4
+ data.tar.gz: 4c5e1bcfc43aa3cd3940bfcab897952b6eff5ede
5
5
  SHA512:
6
- metadata.gz: c56b220c9e4c9413c4c531762535d9f24f90901c068b12bb6e2c69a01ae6774070ad3df8b7bf8c7a1f56bb10b1dd8152ec5dbf6d89e18c775c96123dce91653f
7
- data.tar.gz: ac6473f67e21254b474de0113a23864de1a79246ed610bd15961b288772db8df8623ccd6c47dcdb1258a5c3d29b3cdb471ba928dda6216b598a16bf419c1d2b8
6
+ metadata.gz: 2c233281115ca22cb267b7b22814d70d534d1eb31e4f7106cd39b095f130e430a05e03bbd391545c3b9710b581cd09b81970a6d6ad99e450812e3d891f79de4e
7
+ data.tar.gz: e118354ada928dcbfdfd8a0bcdc217eb41ac9e4f6b0e28b28615a525c67dd77b4ff9650b352391afd916268b6c169b648e1a44ff27a466e12df496391660786c
@@ -35,6 +35,20 @@ describe Unidom::Category::CategoryScheme, type: :model do
35
35
  { name: '1'*(name_max_length+1) } => 1,
36
36
  { name: 'A'*(name_max_length+1) } => 1
37
37
 
38
+ category_1_attributes = {
39
+ code: 'XC1',
40
+ name: 'Top Category #1',
41
+ abbreviation: 'TopCat-2'
42
+ }
43
+
44
+ category_2_attributes = {
45
+ code: 'XC2',
46
+ name: 'Top Category #2',
47
+ abbreviation: 'TopCat-2'
48
+ }
49
+
50
+ it_behaves_like 'has_many', model_attributes, :categories, Unidom::Category::Category, [ category_1_attributes, category_2_attributes ]
51
+
38
52
  end
39
53
 
40
54
  end
@@ -54,6 +54,14 @@ describe Unidom::Category::Category, type: :model do
54
54
  { abbreviation: '1'*(abbreviation_max_length+1) } => 1,
55
55
  { abbreviation: 'A'*(abbreviation_max_length+1) } => 1
56
56
 
57
+ scheme_attributes = {
58
+ owner_id: SecureRandom.uuid,
59
+ owner_type: 'Unidom::Category::Owner::Mock',
60
+ name: 'Scheme #1'
61
+ }
62
+
63
+ it_behaves_like 'belongs_to', model_attributes, :scheme, Unidom::Category::CategoryScheme, scheme_attributes
64
+
57
65
  end
58
66
 
59
67
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Category
3
- VERSION = '1.6.1'.freeze
3
+ VERSION = '1.6.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-category
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
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-22 00:00:00.000000000 Z
11
+ date: 2017-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common