chore: Enable the new Rubocop rules (#7122)

fixes: https://linear.app/chatwoot/issue/CW-1574/renable-the-disabled-rubocop-rules
This commit is contained in:
Sojan Jose
2023-05-19 14:37:10 +05:30
committed by GitHub
parent b988a01df3
commit 7ab7bac6bf
215 changed files with 609 additions and 608 deletions

View File

@@ -26,7 +26,7 @@ RSpec.describe '/api/v1/accounts/:account_id/conversations/:conversation_id/dire
as: :json
expect(response).to have_http_status(:success)
json_response = JSON.parse(response.body)
json_response = response.parsed_body
expect(json_response['content_type']).to eq('image/png')
end
end

View File

@@ -45,7 +45,7 @@ RSpec.describe 'Conversation Messages API', type: :request do
expect(response).to have_http_status(:unprocessable_entity)
json_response = JSON.parse(response.body)
json_response = response.parsed_body
expect(json_response['error']).to eq('Validation failed: Content is too long (maximum is 150000 characters)')
end
@@ -61,7 +61,7 @@ RSpec.describe 'Conversation Messages API', type: :request do
as: :json
expect(response).to have_http_status(:success)
response_data = JSON.parse(response.body)
response_data = response.parsed_body
expect(response_data['content_attributes']['external_created_at']).to eq time_stamp
expect(conversation.messages.count).to eq(1)
expect(conversation.messages.last.sender_id).to eq(agent_bot.id)