X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e84f0c710dcf03e8a5eb92f86b6aecaa26c802d1..b072c2935f8f79e16b2b63cc5e01fc34326f7daa:/test/models/oauth_nonce_test.rb?ds=sidebyside diff --git a/test/models/oauth_nonce_test.rb b/test/models/oauth_nonce_test.rb index 341019cca..56178fb5f 100644 --- a/test/models/oauth_nonce_test.rb +++ b/test/models/oauth_nonce_test.rb @@ -1,8 +1,6 @@ require "test_helper" class OauthNonceTest < ActiveSupport::TestCase - api_fixtures - ## # the nonce has only one property, that it is a unique pair of # string and timestamp. @@ -14,7 +12,7 @@ class OauthNonceTest < ActiveSupport::TestCase assert_not_equal false, nonce1, "First nonce should be unique. Check your test database is empty." nonce2 = OauthNonce.remember(string, timestamp) - assert_equal false, nonce2, "Shouldn't be able to remember the same nonce twice." + assert_not nonce2, "Shouldn't be able to remember the same nonce twice." end ## @@ -23,7 +21,7 @@ class OauthNonceTest < ActiveSupport::TestCase string = "0123456789ABCDEF" nonce1 = OauthNonce.remember(string, Time.now.to_i - 86430) - assert_equal false, nonce1, "Nonces over a day in the past should be rejected" + assert_not nonce1, "Nonces over a day in the past should be rejected" nonce2 = OauthNonce.remember(string, Time.now.to_i - 86370) assert_not_equal false, nonce2, "Nonces under a day in the past should be rejected"