unidom-article_number 2.3.5 → 2.3.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74103cd6a92bbb282cfcf21b4afe9c7af05fb222
|
4
|
+
data.tar.gz: 3242e70644755303d151dcd13f74f6fc57d208a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f76fa1454c4d69591d9c0b53b54d7084f00b4b484c4413045287a277f497db142b9e77d2a16b4fe8f160f7aafd58716e323871a01651b20183aa98e25551a51
|
7
|
+
data.tar.gz: 9158fcf17ced6e26a6cdfeb4eba8522dac6fead3c07be715107e4413e5bfb15dd3f89290cf98ceca0966900a56c787a582c0d825be48c693b1ccd6f06c342f83
|
@@ -19,20 +19,7 @@ describe Unidom::ArticleNumber::Marking, type: :model do
|
|
19
19
|
|
20
20
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
21
21
|
|
22
|
-
it_behaves_like 'scope', :barcode_is, [
|
23
|
-
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::ArticleNumber::Ean13Barcode.new( id: model_attributes[:barcode_id]) ] },
|
24
|
-
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::ArticleNumber::Ean8Barcode.new( id: model_attributes[:barcode_id]) ] },
|
25
|
-
{ attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::ArticleNumber::VehicleIdentificationNumber.new(id: model_attributes[:barcode_id]) ] },
|
26
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::Ean13Barcode' ) ], count_diff: 1, args: [ Unidom::ArticleNumber::Ean13Barcode.new( id: model_attributes[:barcode_id]) ] },
|
27
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::Ean13Barcode' ) ], count_diff: 0, args: [ Unidom::ArticleNumber::Ean8Barcode.new( id: model_attributes[:barcode_id]) ] },
|
28
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::Ean13Barcode' ) ], count_diff: 0, args: [ Unidom::ArticleNumber::VehicleIdentificationNumber.new(id: model_attributes[:barcode_id]) ] },
|
29
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::Ean8Barcode' ) ], count_diff: 0, args: [ Unidom::ArticleNumber::Ean13Barcode.new( id: model_attributes[:barcode_id]) ] },
|
30
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::Ean8Barcode' ) ], count_diff: 1, args: [ Unidom::ArticleNumber::Ean8Barcode.new( id: model_attributes[:barcode_id]) ] },
|
31
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::Ean8Barcode' ) ], count_diff: 0, args: [ Unidom::ArticleNumber::VehicleIdentificationNumber.new(id: model_attributes[:barcode_id]) ] },
|
32
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::VehicleIdentificationNumber') ], count_diff: 0, args: [ Unidom::ArticleNumber::Ean13Barcode.new( id: model_attributes[:barcode_id]) ] },
|
33
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::VehicleIdentificationNumber') ], count_diff: 0, args: [ Unidom::ArticleNumber::Ean8Barcode.new( id: model_attributes[:barcode_id]) ] },
|
34
|
-
{ attributes_collection: [ model_attributes.merge(barcode_type: 'Unidom::ArticleNumber::VehicleIdentificationNumber') ], count_diff: 1, args: [ Unidom::ArticleNumber::VehicleIdentificationNumber.new(id: model_attributes[:barcode_id]) ] }
|
35
|
-
]
|
22
|
+
it_behaves_like 'polymorphic scope', model_attributes, :barcode_is, :barcode, [ Unidom::ArticleNumber::Ean13Barcode, Unidom::ArticleNumber::Ean8Barcode, Unidom::ArticleNumber::VehicleIdentificationNumber ]
|
36
23
|
|
37
24
|
end
|
38
25
|
|
@@ -14,6 +14,22 @@ describe Unidom::ArticleNumber::VehicleIdentificationNumber, type: :model do
|
|
14
14
|
|
15
15
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
16
16
|
|
17
|
+
it_behaves_like 'validates', model_attributes, :code,
|
18
|
+
{ } => 0,
|
19
|
+
{ code: nil } => 2,
|
20
|
+
{ code: '' } => 2,
|
21
|
+
{ code: '1' } => 1,
|
22
|
+
{ code: 'A' } => 1,
|
23
|
+
{ code: '11' } => 1,
|
24
|
+
{ code: 'AA' } => 1,
|
25
|
+
{ code: '111' } => 1,
|
26
|
+
{ code: 'AAA' } => 1,
|
27
|
+
{ code: 'LFVAA11A6X207535' } => 1,
|
28
|
+
{ code: 'LFVAA11A6X2075354' } => 1,
|
29
|
+
{ code: 'LFVAA11A6X2075355' } => 0,
|
30
|
+
{ code: 'LFVAA11A6X2075356' } => 1,
|
31
|
+
{ code: 'LFVAA11A6X20753559' } => 2
|
32
|
+
|
17
33
|
end
|
18
34
|
|
19
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-article_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.6
|
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-
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|