unidom-party 1.8.5 → 1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/lib/rspec/models/unidom/party/collaborating_spec.rb +26 -0
- data/lib/rspec/models/unidom/party/company_spec.rb +19 -0
- data/lib/rspec/models/unidom/party/government_agency_spec.rb +22 -0
- data/lib/rspec/models/unidom/party/party_relation_spec.rb +1 -1
- data/lib/rspec/models/unidom/party/person_spec.rb +3 -1
- data/lib/rspec/models/unidom/party/shop_spec.rb +19 -0
- data/lib/rspec/types/unidom/party/gender_spec.rb +15 -0
- data/lib/unidom/party/models_rspec.rb +8 -0
- data/lib/unidom/party/types_rspec.rb +1 -0
- data/lib/unidom/party/validators_rspec.rb +0 -0
- data/lib/unidom/party/version.rb +1 -1
- metadata +10 -3
- data/lib/unidom/party/rspec.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0656223c31ea8af9d8eeee90a02f6e0f98fabddc
|
4
|
+
data.tar.gz: 24714c2c70ef1c865ad6560ae16d4dbda4859304
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52674f63fdc94be70182afe5a84eaa2006d4829e1c4c23a682708ea870444ff4d664b184ddc0e813e5c64c6b0d30816469bfbe248f95ba661d88b115cc062010
|
7
|
+
data.tar.gz: 6239e0a0f92ccdd42c7ae7ba7ddeed0d052729dcaaaa7bd6669e9dfa3e14df0be1fd89ee72ee36c4abcb3491a11e56fc851725c1ee915fe96116edf11df9cdc1
|
data/README.md
CHANGED
@@ -136,6 +136,12 @@ end
|
|
136
136
|
## RSpec examples
|
137
137
|
|
138
138
|
```ruby
|
139
|
-
# spec/unidom_spec.rb
|
140
|
-
require 'unidom/party/
|
139
|
+
# spec/models/unidom_spec.rb
|
140
|
+
require 'unidom/party/models_rspec'
|
141
|
+
|
142
|
+
# spec/types/unidom_spec.rb
|
143
|
+
require 'unidom/party/types_rspec'
|
144
|
+
|
145
|
+
# spec/validators/unidom_spec.rb
|
146
|
+
require 'unidom/party/validators_rspec'
|
141
147
|
```
|
@@ -0,0 +1,26 @@
|
|
1
|
+
describe Unidom::Party::Collaborating, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
collaboration_id: SecureRandom.uuid,
|
13
|
+
collaboration_type: 'Unidom::Party::Collaboration::Mock',
|
14
|
+
collaborator_id: SecureRandom.uuid,
|
15
|
+
collaborator_type: 'Unidom::Party::Collaborator::Mock',
|
16
|
+
role_code: 'ZZZZ',
|
17
|
+
name: 'Attention',
|
18
|
+
priority: 3,
|
19
|
+
grade: 5
|
20
|
+
}
|
21
|
+
|
22
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
describe Unidom::Party::Company, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
name: 'Tesla'
|
13
|
+
}
|
14
|
+
|
15
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
describe Unidom::Party::GovernmentAgency, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
supervision_region_id: SecureRandom.uuid,
|
13
|
+
supervision_region_type: 'Unidom::Party::SupervisionRegion::Mock',
|
14
|
+
name: 'WalMart',
|
15
|
+
function_code: 'ZZZZ'
|
16
|
+
}
|
17
|
+
|
18
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -16,7 +16,7 @@ describe Unidom::Party::PartyRelation, type: :model do
|
|
16
16
|
source_party_id: Unidom::Common::NULL_UUID,
|
17
17
|
source_party_type: 'Unidom::Party::Person',
|
18
18
|
target_party_id: Unidom::Common::NULL_UUID,
|
19
|
-
target_party_type: 'Unidom::Party::Person'
|
19
|
+
target_party_type: 'Unidom::Party::Person'
|
20
20
|
#priority: nil,
|
21
21
|
#grade: nil
|
22
22
|
})
|
@@ -29,7 +29,9 @@ describe Unidom::Party::Person, type: :model do
|
|
29
29
|
|
30
30
|
context do
|
31
31
|
|
32
|
-
model_attributes = {
|
32
|
+
model_attributes = {
|
33
|
+
name: 'Tim'
|
34
|
+
}
|
33
35
|
|
34
36
|
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
35
37
|
it_behaves_like 'Unidom::Party::Concerns::AsSourceParty', model_attributes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
describe Unidom::Party::Shop, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
name: 'WalMart'
|
13
|
+
}
|
14
|
+
|
15
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
describe Unidom::Party::Gender, type: :type do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
it_behaves_like 'ProgneTapera::EnumConfig', 4, [
|
10
|
+
{ code: '0', name: 'not_known', localized_name: '未知' },
|
11
|
+
{ code: '1', name: 'male', localized_name: '男性' },
|
12
|
+
{ code: '2', name: 'female', localized_name: '女性' },
|
13
|
+
{ code: '9', name: 'not_applicable', localized_name: '保密' } ]
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'rspec/models/unidom/party/concerns/as_source_party_shared_examples'
|
2
|
+
|
3
|
+
require 'rspec/models/unidom/party/party_relation_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::PartyRelation'
|
4
|
+
require 'rspec/models/unidom/party/person_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Person'
|
5
|
+
require 'rspec/models/unidom/party/shop_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Shop'
|
6
|
+
require 'rspec/models/unidom/party/company_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Company'
|
7
|
+
require 'rspec/models/unidom/party/government_agency_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::GovernmentAgency'
|
8
|
+
require 'rspec/models/unidom/party/collaborating_spec' unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::Collaborating'
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'rspec/types/unidom/party/gender_spec'
|
File without changes
|
data/lib/unidom/party/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-party
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.9'
|
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-
|
11
|
+
date: 2017-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -65,13 +65,20 @@ files:
|
|
65
65
|
- db/migrate/20010104000000_create_unidom_government_agencies.rb
|
66
66
|
- db/migrate/20010105000000_create_unidom_companies.rb
|
67
67
|
- db/migrate/20010111000000_create_unidom_collaboratings.rb
|
68
|
+
- lib/rspec/models/unidom/party/collaborating_spec.rb
|
69
|
+
- lib/rspec/models/unidom/party/company_spec.rb
|
68
70
|
- lib/rspec/models/unidom/party/concerns/as_source_party_shared_examples.rb
|
71
|
+
- lib/rspec/models/unidom/party/government_agency_spec.rb
|
69
72
|
- lib/rspec/models/unidom/party/party_relation_spec.rb
|
70
73
|
- lib/rspec/models/unidom/party/person_spec.rb
|
74
|
+
- lib/rspec/models/unidom/party/shop_spec.rb
|
75
|
+
- lib/rspec/types/unidom/party/gender_spec.rb
|
71
76
|
- lib/tasks/party_tasks.rake
|
72
77
|
- lib/unidom/party.rb
|
73
78
|
- lib/unidom/party/engine.rb
|
74
|
-
- lib/unidom/party/
|
79
|
+
- lib/unidom/party/models_rspec.rb
|
80
|
+
- lib/unidom/party/types_rspec.rb
|
81
|
+
- lib/unidom/party/validators_rspec.rb
|
75
82
|
- lib/unidom/party/version.rb
|
76
83
|
homepage: http://github.com/topbitdu/unidom-party
|
77
84
|
licenses:
|
data/lib/unidom/party/rspec.rb
DELETED