mirror of
https://github.com/samsonjs/simple_oauth.git
synced 2026-03-25 08:45:54 +00:00
Add PLAINTEXT signature test.
This commit is contained in:
parent
6e188c8bab
commit
644b8bb2fe
1 changed files with 14 additions and 1 deletions
|
|
@ -266,6 +266,19 @@ class SimpleOAuthTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def plaintext_signature
|
||||
# Pending
|
||||
# Sample request taken from:
|
||||
# http://oauth.googlecode.com/svn/code/javascript/example/signature.html
|
||||
options = {
|
||||
:consumer_key => 'abcd',
|
||||
:consumer_secret => 'efgh',
|
||||
:nonce => 'oLKtec51GQy',
|
||||
:signature_method => 'PLAINTEXT',
|
||||
:timestamp => '1286977095',
|
||||
:token => 'ijkl',
|
||||
:token_secret => 'mnop'
|
||||
}
|
||||
successful = 'OAuth oauth_consumer_key="abcd", oauth_nonce="oLKtec51GQy", oauth_signature="efgh%26mnop", oauth_signature_method="PLAINTEXT", oauth_timestamp="1286977095", oauth_token="ijkl", oauth_version="1.0"'
|
||||
header = SimpleOAuth::Header.new(:get, 'http://host.net/resource?name=value', {:name => 'value'}, options)
|
||||
assert_equal successful, header.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue