lib/napa/rspec_extensions/response_helpers.rb in napa-0.4.3 vs lib/napa/rspec_extensions/response_helpers.rb in napa-0.5.0
- old
+ new
@@ -27,9 +27,13 @@
def expect_count_of(count)
expect(result_count).to eq(count)
end
+ def expect_error_code(error_code)
+ expect(parsed_response.error.code).to eq(error_code.to_s)
+ end
+
def expect_only(object)
expect_count_of 1
expect(first_result.id).to eq(object.id)
end