diff --git a/.rubocop.yml b/.rubocop.yml index b9e96f1..076a900 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,7 +8,6 @@ AllCops: - 'example.rb' - 'tmp/*' - 'vendor/**/*' - TargetRubyVersion: 3.1 Style/HashSyntax: Enabled: false diff --git a/lib/whatsapp_sdk/api/client.rb b/lib/whatsapp_sdk/api/client.rb index 1be8c67..c0d9346 100644 --- a/lib/whatsapp_sdk/api/client.rb +++ b/lib/whatsapp_sdk/api/client.rb @@ -50,7 +50,7 @@ def templates def send_request(endpoint: "", full_url: nil, http_method: "post", params: {}, headers: {}, multipart: false) url = full_url || "#{ApiConfiguration::API_URL}/#{@api_version}/" - faraday_request = faraday(url:, multipart:) + faraday_request = faraday(url: url, multipart: multipart) response = faraday_request.public_send(http_method, endpoint, request_params(params, headers), headers) diff --git a/test/whatsapp/api/client_test.rb b/test/whatsapp/api/client_test.rb index f636b72..fa90f15 100644 --- a/test/whatsapp/api/client_test.rb +++ b/test/whatsapp/api/client_test.rb @@ -161,9 +161,9 @@ def test_templates def stub_test_request(method_name, body: {}, headers: {}, response_status: 200, response_body: { success: true }, api_version: ApiConfiguration::DEFAULT_API_VERSION) stub_request(method_name, "#{ApiConfiguration::API_URL}/#{api_version}/test") - .with(body:, headers: { 'Accept' => '*/*', - 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', - 'Authorization' => 'Bearer test_token' }.merge(headers)) + .with(body: body, headers: { 'Accept' => '*/*', + 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', + 'Authorization' => 'Bearer test_token' }.merge(headers)) .to_return(status: response_status, body: response_body.to_json, headers: {}) end