From d54492f7b52c217c09d3e288751523a595800aec Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Tue, 14 May 2024 14:19:02 -0700 Subject: [PATCH] chore: Add debug statement in spec (#9466) - Add a debug statement to check the failed specs --- spec/controllers/api/v1/accounts/contacts_controller_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/controllers/api/v1/accounts/contacts_controller_spec.rb b/spec/controllers/api/v1/accounts/contacts_controller_spec.rb index 815cecc62..97eddc171 100644 --- a/spec/controllers/api/v1/accounts/contacts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/contacts_controller_spec.rb @@ -97,6 +97,8 @@ RSpec.describe 'Contacts API', type: :request do expect(response).to have_http_status(:success) response_body = response.parsed_body + # TODO: this spec has been flaky for a while, so adding a debug statement to see the response + Rails.logger.info(response_body) expect(response_body['payload'].first['email']).to eq(contact.email) expect(response_body['payload'].first['id']).to eq(contact.id) expect(response_body['payload'].last['email']).to eq(contact_4.email)