]> gitweb.factorcode.org Git - factor.git/blob - extra/oauth/oauth-tests.factor
4e632b049e43a6d7c1f0f5b5e5fc0d505a739d26
[factor.git] / extra / oauth / oauth-tests.factor
1 USING: oauth oauth.private tools.test accessors kernel assocs
2 strings namespaces urls ;
3 IN: oauth.tests
4
5 [ "%26&b" ] [ "&" "b" hmac-key ] unit-test
6 [ "%26&" ] [ "&" f hmac-key ] unit-test
7
8 [ "B&http%3A%2F%2Ftwitter.com%2F&a%3Db" ] [
9     URL" http://twitter.com"
10     "B"
11     { { "a" "b" } }
12     signature-base-string
13 ] unit-test
14
15 [ "0EieqbHx0FJ/RtFskmRj9/TDpqo=" ] [
16     "ABC" "DEF" <token> consumer-token set
17
18     URL" http://twitter.com"
19     <request-token-params>
20         12345 >>timestamp
21         54321 >>nonce
22     <request-token-request>
23     post-data>>
24     "oauth_signature" of
25     >string
26 ] unit-test