mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Improved test thanks to Jose Valim.
This commit is contained in:
parent
2fdb71716f
commit
7b069e641b
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,8 @@ class HttpAuthenticationTest < ActionController::IntegrationTest
|
|||
|
||||
# Sign in with oauth2 token. This is just to test that it isn't misinterpreted as basic authentication
|
||||
def add_oauth2_header
|
||||
get users_path(:format => :xml), {}, "HTTP_AUTHORIZATION" => "OAuth #{ActiveSupport::SecureRandom.base64}"
|
||||
user = create_user
|
||||
get users_path(:format => :xml), {}, "HTTP_AUTHORIZATION" => "OAuth #{ActiveSupport::Base64.encode64("#{user.email}:123456")}"
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Reference in a new issue