unidom-action 1.17.16 → 1.17.17
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: 83d2f5330131cdb72f7efc8c1646b6358ee813aa
|
4
|
+
data.tar.gz: 51bfbf64d794963992f4017bb4cbab6bfd4a821a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826e888b006a92292d060680f737aa6b69794216783986b590536ffe0c973e7ec49364ddb60c9000b433ebf15d58dc0e04ca12713afb3cc0c5fff108024f45fe
|
7
|
+
data.tar.gz: 39ad8de43b3df18363b514d05ae02feed2efb1c954677e2afcc6c0c1b00adf5615344c2f333db3bfb46e0307ba84d03c71ad19cd5d07bf619982b4603f345b0e
|
data/README.md
CHANGED
@@ -371,7 +371,15 @@ describe YourObsolesced, type: :model do
|
|
371
371
|
your_attribute: 'your value'
|
372
372
|
}
|
373
373
|
|
374
|
-
|
374
|
+
obsolescer_party_attributes = {
|
375
|
+
name: 'Tim'
|
376
|
+
}
|
377
|
+
obsolescer_party = Unidom::Party::Person.create! obsolescer_party_attributes
|
378
|
+
|
379
|
+
obsolescer_visitor_attributes = {}
|
380
|
+
obsolescer_visitor = Unidom::Visitor::User.create! obsolescer_visitor_attributes
|
381
|
+
|
382
|
+
it_behaves_like 'Unidom::Action::Concerns::AsObsolesced', model_attributes, obsolescer_party, obsolescer_visitor
|
375
383
|
|
376
384
|
end
|
377
385
|
|
@@ -11,6 +11,8 @@ module Unidom::Action::Concerns::AsObsolesced
|
|
11
11
|
|
12
12
|
assert_present! :obsolescence_code, obsolescence_code
|
13
13
|
assert_present! :via, via
|
14
|
+
assert_present! :by, by
|
15
|
+
assert_present! :at, at
|
14
16
|
|
15
17
|
obsolescings.create! obsolescence_code: 'OBSL', obsolescer_visitor: via, obsolescer_party: by, reason: due_to, opened_at: at
|
16
18
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
shared_examples 'Unidom::Action::Concerns::AsObsolesced' do |model_attributes|
|
1
|
+
shared_examples 'Unidom::Action::Concerns::AsObsolesced' do |model_attributes, obsolescer_party, obsolescer_visitor|
|
2
2
|
|
3
3
|
context do
|
4
4
|
|
@@ -24,6 +24,9 @@ shared_examples 'Unidom::Action::Concerns::AsObsolesced' do |model_attributes|
|
|
24
24
|
|
25
25
|
it_behaves_like 'has_many', model_attributes, :obsolescings, Unidom::Action::Obsolescing, [ obsolescing_1_attributes, obsolescing_2_attributes ]
|
26
26
|
|
27
|
+
model = described_class.create! model_attributes
|
28
|
+
it_behaves_like 'assert_present!', model, :is_obsolesced!, [ { obsolescence_code: 'OBSL', due_to: nil, by: obsolescer_party, via: obsolescer_visitor, at: Time.now } ], [ :by, :via, :at, :obsolescence_code ]
|
29
|
+
|
27
30
|
end
|
28
31
|
|
29
32
|
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.17
|
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-05-
|
11
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|