3 class OauthNonceTest < ActiveSupport::TestCase
7 # the nonce has only one property, that it is a unique pair of
8 # string and timestamp.
9 def test_nonce_uniqueness
10 string = "0123456789ABCDEF"
13 nonce1 = OauthNonce.remember(string, timestamp)
14 assert_not_equal false, nonce1, "First nonce should be unique. Check your test database is empty."
16 nonce2 = OauthNonce.remember(string, timestamp)
17 assert_equal false, nonce2, "Shouldn't be able to remember the same nonce twice."