unidom-action 1.17.16 → 1.17.17

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: 12c9dbae30d0111e2cf451d744ec603c2aad8dd7
4
- data.tar.gz: 24982c865d56fa7408e4d030f78fa9998ae4914a
3
+ metadata.gz: 83d2f5330131cdb72f7efc8c1646b6358ee813aa
4
+ data.tar.gz: 51bfbf64d794963992f4017bb4cbab6bfd4a821a
5
5
  SHA512:
6
- metadata.gz: c14cce7398720cada3f7bc3bda1248e2357afff278b848b329cc52875250fbd274e8876348f0830ee9f2b70dead3fc558424f24ee26b869bcf35e3d7963f73b5
7
- data.tar.gz: af8b1d7a95a4974bff64916c9e8266f6fb4d1e4ccbd12d3090424fcede19661b0975d54bf48c39af11d69e021705e7d0ed77526503432da0871f3af3bd1dc86a
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
- it_behaves_like 'Unidom::Action::Concerns::AsObsolesced', model_attribtues
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
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Action
3
- VERSION = '1.17.16'.freeze
3
+ VERSION = '1.17.17'.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.16
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-04 00:00:00.000000000 Z
11
+ date: 2017-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common