restspec 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restspec/schema/types/schema_id_type.rb +4 -4
- data/lib/restspec/version.rb +1 -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: d1403eca3180dfa8f249ce3fead22bb161ff7d20
|
4
|
+
data.tar.gz: d0570bf19544f321eb35109802e8366d87cbc466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beff9885cf2d3aa080a65c65eb93926bb69f8c61d2c48fe93bfdb5b1a3e85b9ee7ff8a4e0da032d55b1a7bd423810415532247283c285b5dc0ce3891e4c67950
|
7
|
+
data.tar.gz: a8181a79efd09bf428094c34ac7f5c184cab60c2222e897f1416768b25e1e7ef80a15830dbc9d76f601602223add6384e19abb24c63a1cb575797c9f490513c3
|
@@ -7,10 +7,10 @@ module Restspec::Schema::Types
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def example_for(attribute)
|
10
|
-
return sample_item
|
10
|
+
return sample_item[id_property] if sample_item.present?
|
11
11
|
|
12
|
-
if create_response.code == 201 && create_response.body
|
13
|
-
create_response.body
|
12
|
+
if create_response.code == 201 && create_response.body[id_property].present?
|
13
|
+
create_response.body[id_property]
|
14
14
|
else
|
15
15
|
hardcoded_fallback
|
16
16
|
end
|
@@ -20,7 +20,7 @@ module Restspec::Schema::Types
|
|
20
20
|
|
21
21
|
def valid?(attribute, value)
|
22
22
|
return true unless perform_validation?
|
23
|
-
item_ids.any? { |item| item
|
23
|
+
item_ids.any? { |item| item[id_property] == value }
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
data/lib/restspec/version.rb
CHANGED