unidom-position 1.5 → 1.5.1

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: 0ec0d603b69dc5b97fb041bb6711e8742ec3c7d9
4
- data.tar.gz: beef56973619870bd5be3473a2ce874d33fd8570
3
+ metadata.gz: e6ddb64e6ad18f4e5e7c06671a13706c1b9ac722
4
+ data.tar.gz: 1954b896bd53c093685dd5891c1798887f2dd98e
5
5
  SHA512:
6
- metadata.gz: b5613a724b6986c64643a36b547e3e840809dae138f32b7de028a9e4fd9b2a308290dfe64128e2963c9f681dab4f9fc949d819ca58a8a23b8874bd9ed8a4c653
7
- data.tar.gz: 00b7eb0710d048fc3e5f352a74cb02c6ceedd62a80572bb5ca3895cb8c016f47dc6a4cad513c42c4948c255ef4fe229e660a1069bd9eaffab2d6f603c3862b74
6
+ metadata.gz: e579c58409d2ea75bf717dd48df033cdd3e7b7f4dd7d94b221ccae79d15386b25a2479e1deb45070dd0ccd02e0f5af8c5cc3e4f77898292c49566bb61d5034ba
7
+ data.tar.gz: e0c5015c998a8977101ee4adce24aeba3e8fab631a4fd980f53d1db774584f8273ddc09fdc1c4ea407109c9606d19148bdc941fe1419e38621747c1bc8f03b4f
@@ -15,8 +15,21 @@ 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
+
18
20
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
21
 
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
32
+
20
33
  end
21
34
 
22
35
  end
@@ -15,8 +15,21 @@ 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
+
18
20
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
21
 
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
32
+
20
33
  end
21
34
 
22
35
  end
@@ -15,8 +15,21 @@ 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
+
18
20
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
21
 
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
32
+
20
33
  end
21
34
 
22
35
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Position
3
- VERSION = '1.5'.freeze
3
+ VERSION = '1.5.1'.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'
4
+ version: 1.5.1
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-02 00:00:00.000000000 Z
11
+ date: 2017-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common