global-registry-bindings 0.0.3 → 0.0.4

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.
@@ -74,27 +74,11 @@ RSpec.describe 'Organization' do
74
74
  context 'record with a parent' do
75
75
  let(:parent) { create(:organization, name: 'Parent', description: 'Parent Fancy Organization') }
76
76
  let(:organization) { create(:organization, parent: parent) }
77
- let!(:sub_requests) do
78
- [stub_request(:post, 'https://backend.global-registry.org/entities')
79
- .with(body: { entity: { fancy_org: { name: 'Parent', description: 'Parent Fancy Organization',
80
- start_date: '2001-02-03', parent_id: nil,
81
- client_integration_id: parent.id,
82
- client_updated_at: '2001-02-03 00:00:00' } } })
83
- .to_return(body: file_fixture('post_entities_fancy_org_parent.json'), status: 200),
84
- stub_request(:post, 'https://backend.global-registry.org/entities')
85
- .with(body: { entity: { fancy_org: { name: 'Organization', description: 'Fancy Organization',
86
- start_date: '2001-02-03',
87
- parent_id: 'cd5da38a-c336-46a7-b818-dcdd51c4acde',
88
- client_integration_id: organization.id,
89
- client_updated_at: '2001-02-03 00:00:00' } } })
90
- .to_return(body: file_fixture('post_entities_fancy_org.json'), status: 200)]
91
- end
92
-
93
- it 'should create \'fancy_org\' entity_type and push both entities' do
94
- organization.push_entity_to_global_registry
95
- (requests + sub_requests).each { |r| expect(r).to have_been_requested.once }
96
- expect(parent.gr_id).to eq 'cd5da38a-c336-46a7-b818-dcdd51c4acde'
97
- expect(organization.gr_id).to eq 'aebb4170-3f34-11e7-bba6-129bd0521531'
77
+ it 'should create \'fancy_org\' entity_type raise an exception' do
78
+ expect do
79
+ organization.push_entity_to_global_registry
80
+ requests.each { |r| expect(r).to have_been_requested.once }
81
+ end.to raise_error GlobalRegistry::Bindings::ParentEntityMissingGlobalRegistryId
98
82
  end
99
83
  end
100
84
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global-registry-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Zoetewey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord