unidom-position 1.5.3 → 1.5.4

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: c0aebfeff22fac8fcee7b61f10af5548ac1a60ee
4
- data.tar.gz: bee1c6d738a4e646db8ec74f6aaaf91f30b83124
3
+ metadata.gz: 67ea03639ae8d9927929164d570168a7b95f7a91
4
+ data.tar.gz: 4093409eff0bccf13048081800d32055290e887f
5
5
  SHA512:
6
- metadata.gz: 981a73856ae6facf5d4a79548e1cb741130d28465585c407e7bcd7054a42354c859d92b669f86731b56cc0b9430f1fa50027a469dbde61de84223ead32ed6c04
7
- data.tar.gz: 4dfad23d77efd6cc99bb58b8f834577ea90401a9e62e56ef61e36f363e0f3a9917fbb43f502daf2a5aacdd8f0d4316e41206b1e2b8e5356286ea4ac93ae68dd0
6
+ metadata.gz: f2fe2e87d7d3fce367977859d7b352264f641043444d879d5d66c75c90d083f0febabe9b799e455a6f2b9497f32c757f194598c810a2707fb717dad9dfbb8ad5
7
+ data.tar.gz: 1fc6871a544c33e397bd73b9f78c266928497f27288db880e3465cbcabd579a470a15348e11cb9bbba9452d9bd27414ec5d58dd2c9318ef58db6874cd6ab5bbc
@@ -15,20 +15,9 @@ describe Unidom::Position::Occupation, type: :model do
15
15
  name: 'Some Occupation'
16
16
  }
17
17
 
18
- name_max_length = described_class.columns_hash['name'].limit
19
-
20
18
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
21
19
 
22
- it_behaves_like 'validates', model_attributes, :name,
23
- { } => 0,
24
- { name: nil } => 2,
25
- { name: '' } => 2,
26
- { name: 'A' } => 1,
27
- { name: 'AA' } => 0,
28
- { name: 'AAA' } => 0,
29
- { name: 'A'*(name_max_length-1) } => 0,
30
- { name: 'A'*name_max_length } => 0,
31
- { name: 'A'*(name_max_length+1) } => 1
20
+ it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
32
21
 
33
22
  position_1_attributes = {
34
23
  organization_id: SecureRandom.uuid,
@@ -15,20 +15,9 @@ describe Unidom::Position::Position, type: :model do
15
15
  name: 'Some Position'
16
16
  }
17
17
 
18
- name_max_length = described_class.columns_hash['name'].limit
19
-
20
18
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
21
19
 
22
- it_behaves_like 'validates', model_attributes, :name,
23
- { } => 0,
24
- { name: nil } => 2,
25
- { name: '' } => 2,
26
- { name: 'A' } => 1,
27
- { name: 'AA' } => 0,
28
- { name: 'AAA' } => 0,
29
- { name: 'A'*(name_max_length-1) } => 0,
30
- { name: 'A'*name_max_length } => 0,
31
- { name: 'A'*(name_max_length+1) } => 1
20
+ it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
32
21
 
33
22
  occupation_attributes = {
34
23
  scheme_id: SecureRandom.uuid,
@@ -15,20 +15,9 @@ describe Unidom::Position::Post, type: :model do
15
15
  name: 'Some Post'
16
16
  }
17
17
 
18
- name_max_length = described_class.columns_hash['name'].limit
19
-
20
18
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
21
19
 
22
- it_behaves_like 'validates', model_attributes, :name,
23
- { } => 0,
24
- { name: nil } => 2,
25
- { name: '' } => 2,
26
- { name: 'A' } => 1,
27
- { name: 'AA' } => 0,
28
- { name: 'AAA' } => 0,
29
- { name: 'A'*(name_max_length-1) } => 0,
30
- { name: 'A'*name_max_length } => 0,
31
- { name: 'A'*(name_max_length+1) } => 1
20
+ it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
32
21
 
33
22
  end
34
23
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Position
3
- VERSION = '1.5.3'.freeze
3
+ VERSION = '1.5.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-position
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.4
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-03-08 00:00:00.000000000 Z
11
+ date: 2017-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common