Skip to content

Commit c7e6093

Browse files
authored
Test to check content type header for x-www-form-urlencoded (#451)
It is primarily JSON, but some parts are x-www-form-urlencoded. I will add tests for this.
1 parent 6b254ba commit c7e6093

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/line/bot/v2/misc_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,10 @@
231231
it "doesn't require bearer token" do
232232
stub_request(:post, "https://api.line.me/v2/oauth/accessToken")
233233
.with(
234-
body: { client_id: "test-client-id", client_secret: "test-client-secret", grant_type: "client_credentials" }
234+
body: { client_id: "test-client-id", client_secret: "test-client-secret", grant_type: "client_credentials" },
235+
headers: {
236+
'Content-Type' => 'application/x-www-form-urlencoded'
237+
}
235238
)
236239
.to_return(status: response_code, body: response_body, headers: { 'Content-Type' => 'application/json' })
237240

0 commit comments

Comments
 (0)