Skip to content

Commit

Permalink
add test for special characters during authentication
Browse files Browse the repository at this point in the history
references #407
  • Loading branch information
mislav committed Sep 30, 2013
1 parent eedc53b commit 1412e50
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions features/authentication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,28 @@ Feature: OAuth authentication
Then the output should contain "two-factor authentication code:"
And the exit status should be 0
And the file "../home/.config/hub" should contain "oauth_token: OTOKEN"

Scenario: Special characters in username & password
Given the GitHub API server:
"""
require 'rack/auth/basic'
get('/authorizations') { '[]' }
post('/authorizations') {
auth = Rack::Auth::Basic::Request.new(env)
halt 401 unless auth.credentials == [
'mislav:[email protected]',
'my pass@phrase ok?'
]
json :token => 'OTOKEN'
}
get('/user') {
json :login => 'mislav'
}
post('/user/repos') {
json :full_name => 'mislav/dotfiles'
}
"""
When I run `hub create` interactively
When I type "mislav:[email protected]"
And I type "my pass@phrase ok?"
Then the exit status should be 0

0 comments on commit 1412e50

Please sign in to comment.