fun_with_json_api 0.0.4 → 0.0.5

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.
@@ -123,6 +123,23 @@ describe FunWithJsonApi::SchemaValidators::CheckRelationships do
123
123
  end
124
124
  end
125
125
 
126
+ context 'when the document does not have an expected relationship' do
127
+ let(:document) do
128
+ {
129
+ 'data' => {
130
+ 'id' => '42',
131
+ 'type' => 'examples'
132
+ }
133
+ }
134
+ end
135
+ let(:relationship) do
136
+ instance_double('FunWithJsonApi::RelationshipCollection', name: :foobar, has_many?: true)
137
+ end
138
+ before { allow(deserializer).to receive(:relationships).and_return([relationship]) }
139
+
140
+ it { is_expected.to eq true }
141
+ end
142
+
126
143
  context 'when the document contains an unsupported relationships' do
127
144
  before { allow(deserializer).to receive(:relationships).and_return([]) }
128
145
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fun_with_json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Morrall