spec/support/matchers/json_matchers.rb in pwb-0.0.1 vs spec/support/matchers/json_matchers.rb in pwb-0.0.2
- old
+ new
@@ -1,9 +1,9 @@
RSpec::Matchers.define :be_jsonapi_response_for do |model|
match do |actual|
parsed_actual = JSON.parse(actual)
parsed_actual.dig('data', 'type') == model &&
- parsed_actual.dig('data', 'attributes').is_a?(Hash)
- # &&
- # parsed_actual.dig('data', 'relationships').is_a?(Hash)
+ parsed_actual.dig('data', 'attributes').is_a?(Hash)
+ # &&
+ # parsed_actual.dig('data', 'relationships').is_a?(Hash)
end
-end
\ No newline at end of file
+end