]> gitweb.factorcode.org Git - factor.git/blob - extra/oauth/oauth-tests.factor
assocs: Add of and ?of. Change all the things at once! Fixes #701.
[factor.git] / extra / oauth / oauth-tests.factor
1 USING: oauth oauth.private tools.test accessors kernel assocs
2 strings namespaces ;
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&a%3Db" ] [
9     "http://twitter.com"
10     "B"
11     { { "a" "b" } }
12     signature-base-string
13 ] unit-test
14
15 [ "Z5tUa83q43qiy6dGGCb92bN/4ik=" ] [
16     "ABC" "DEF" <token> consumer-token set
17
18     "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