get 0.1.1 → 0.1.2
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 +4 -4
- data/lib/get/builders/ancestry_builder.rb +8 -1
- data/spec/get_spec.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f987f991988fceeb97503b1c54af77d57f46440
|
4
|
+
data.tar.gz: c7e5d9abc53eff7b84a5a8ddd03708e97d07f161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c23e8af802633e9e3a2ead447985551855dfd762b6310bd2a5f28c1feacbf8c344847814b4c30c87756d8689055487baebed961d9361d72af5a0fe096e30ad79
|
7
|
+
data.tar.gz: fbd607dbf4c878fdcd24e4253d024f82e1e68acfaa4706f3e67862df07726f27991d95d31150b4e475a66b6097748de9d53c0f956c993458d200fc990a1d2bb5
|
data/spec/get_spec.rb
CHANGED
@@ -297,7 +297,12 @@ describe Get do
|
|
297
297
|
employer.sports_cars << sportscar
|
298
298
|
end
|
299
299
|
|
300
|
-
it 'returns the correct ancestor' do
|
300
|
+
it 'returns the correct ancestor (single via symbol)' do
|
301
|
+
result = Get::SportsCarsFromUser.run(user, via: :employer)
|
302
|
+
expect(result.first.to_h).to eq sportscar.attributes
|
303
|
+
end
|
304
|
+
|
305
|
+
it 'returns the correct ancestor (array of via symbols)' do
|
301
306
|
result = Get::SportsCarsFromUser.run(user, via: [:employer])
|
302
307
|
expect(result.first.to_h).to eq sportscar.attributes
|
303
308
|
end
|