未验证 提交 89123523 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #33411 from bogdanvlviv/follow-up-33401-5491f811

Clarify example of the test `ActionController::HttpAuthentication::Token` [ci skip]
......@@ -390,10 +390,9 @@ def opaque(secret_key)
# In your integration tests, you can do something like this:
#
# def test_access_granted_from_xml
# get(
# "/notes/1.xml", nil,
# 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token)
# )
# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token)
#
# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization }
#
# assert_equal 200, status
# end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册