Skip to content

Commit 97d3a27

Browse files
committed
Make sure fake responses are consistent with real responses
1 parent 0894fbc commit 97d3a27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/models/concerns/test_track/resource.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def fake_requests?
3333
end
3434

3535
def request(method:, path:, fake:, body: nil, headers: nil)
36-
return fake if fake_requests?
36+
# Ensure that fake responses are consistent with real responses
37+
return JSON.parse(JSON.generate(fake)) if fake_requests?
3738

3839
response = TestTrack::Resource.connection.run_request(method, path, body, headers)
3940
response.body

0 commit comments

Comments
 (0)