Skip to content

Commit 1cd46d3

Browse files
committed
Address PR 2662 review feedback
1 parent 86e5b97 commit 1cd46d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ curl -X POST \
144144
-H "Accept: application/json" \
145145
-H "Cookie: session_token=eyJfcmFpbHMi..." \
146146
-d '{"access_token": {"description": "Fizzy CLI", "permission": "write"}}' \
147-
https://app.fizzy.do/my/access_tokens
147+
https://app.fizzy.do/1234567/my/access_tokens
148148
```
149149

150150
Or with a Bearer token:

test/controllers/my/access_tokens_controller_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class My::AccessTokensControllerTest < ActionDispatch::IntegrationTest
2121

2222
test "create new token via JSON with session" do
2323
assert_difference -> { identities(:kevin).access_tokens.count }, +1 do
24-
post my_access_tokens_path(format: :json), params: { access_token: { description: "Fizzy CLI", permission: "write" } }
24+
post my_access_tokens_path, params: { access_token: { description: "Fizzy CLI", permission: "write" } }, as: :json
2525
end
2626
assert_response :created
2727
body = @response.parsed_body
@@ -35,7 +35,7 @@ class My::AccessTokensControllerTest < ActionDispatch::IntegrationTest
3535
bearer_token = { "HTTP_AUTHORIZATION" => "Bearer #{identity_access_tokens(:davids_api_token).token}" }
3636

3737
assert_difference -> { identities(:david).access_tokens.count }, +1 do
38-
post my_access_tokens_path(format: :json), params: { access_token: { description: "Fizzy CLI", permission: "read" } }, env: bearer_token
38+
post my_access_tokens_path, params: { access_token: { description: "Fizzy CLI", permission: "read" } }, env: bearer_token, as: :json
3939
end
4040
assert_response :created
4141
body = @response.parsed_body

0 commit comments

Comments
 (0)