unidom-action 1.17 → 1.17.1

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: 8d6bc7a2e8179fd0bd77c82e0b836563de494b9c
4
- data.tar.gz: 3c537b3e1cd182ce6881f73dc0d15c4a25fea392
3
+ metadata.gz: d337ee578f94a99bb1a51ee077c94196bc1f97ab
4
+ data.tar.gz: da4a60d61c9dc66b2efe0463b782a9f7d03b6f4d
5
5
  SHA512:
6
- metadata.gz: c7aad3c5747b8cc3e5c8a0650178261e2e80e3d7771e1cb98e833a6c4114f9a4d7d8074425975dd5fdc5b163f8392d29eee8ede4385421ee6e605ca4151e9ab8
7
- data.tar.gz: 316db12ef79a7d600776f40a676156fcde2aadffa77fc7bb258afd9af48026f40328b1e2156670e7d3bca52f6a2ad36e7d73f7744035408d4e5558a821074476
6
+ metadata.gz: 1cdd87339a7914da2034cee82d019ffdfa0e6573e499f2b95fb9a59438010a185b1c3e1b452c773110f45cbc23a50bc44f36fc30cfc70eddc55e1b6060d074c8
7
+ data.tar.gz: 7d7ec8ca58c7a35771e3f651c449008b3c142a34c45bf33b7b3a8353718778ad0f071665f0fef408ba743a592955903bd942a77edcc518df3aba5f80a7f430fc
@@ -23,6 +23,8 @@ describe Unidom::Action::Acting, type: :model do
23
23
 
24
24
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
25
25
 
26
+ it_behaves_like 'ProgneTapera::EnumCode', described_class.new(model_attributes), :action, Unidom::Action::Action
27
+
26
28
  end
27
29
 
28
30
  end
@@ -21,6 +21,8 @@ describe Unidom::Action::Obsolescing, type: :model do
21
21
 
22
22
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
23
23
 
24
+ it_behaves_like 'ProgneTapera::EnumCode', described_class.new(model_attributes), :obsolescence, Unidom::Action::Obsolescence
25
+
24
26
  end
25
27
 
26
28
  end
@@ -13,8 +13,27 @@ describe Unidom::Action::Reason, type: :model do
13
13
  activity_code: 'ZZZZ'
14
14
  }
15
15
 
16
+ name_max_length = described_class.columns_hash['name'].limit
17
+
16
18
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
17
19
 
20
+ it_behaves_like 'validates', model_attributes, :name,
21
+ { } => 0,
22
+ { name: nil } => 2,
23
+ { name: '' } => 2,
24
+ { name: '1' } => 1,
25
+ { name: 'A' } => 1,
26
+ { name: '11' } => 0,
27
+ { name: 'AA' } => 0,
28
+ { name: '111' } => 0,
29
+ { name: 'AAA' } => 0,
30
+ { name: '1'*(name_max_length-1) } => 0,
31
+ { name: 'A'*(name_max_length-1) } => 0,
32
+ { name: '1'*name_max_length } => 0,
33
+ { name: 'A'*name_max_length } => 0,
34
+ { name: '1'*(name_max_length+1) } => 1,
35
+ { name: 'A'*(name_max_length+1) } => 1
36
+
18
37
  end
19
38
 
20
39
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Action
3
- VERSION = '1.17'.freeze
3
+ VERSION = '1.17.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-action
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.17'
4
+ version: 1.17.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-09 00:00:00.000000000 Z
11
+ date: 2017-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common