Class: ClientNoneTest
- Inherits:
-
ActiveSupport::TestCase
- Object
- ActiveSupport::TestCase
- ClientNoneTest
- Includes:
- OAuth::Helper
- Defined in:
- lib/generators/test_unit/templates/oauth_nonce_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_should_be_valid ⇒ Object
- #test_should_not_be_a_new_record ⇒ Object
- #test_should_not_have_errors ⇒ Object
- #test_shuold_not_allow_a_second_one_with_the_same_values ⇒ Object
Instance Method Details
#setup ⇒ Object
7 8 9 |
# File 'lib/generators/test_unit/templates/oauth_nonce_test.rb', line 7 def setup @oauth_nonce = OauthNonce.remember(generate_key,Time.now.to_i) end |
#test_should_be_valid ⇒ Object
11 12 13 |
# File 'lib/generators/test_unit/templates/oauth_nonce_test.rb', line 11 def test_should_be_valid assert @oauth_nonce.valid? end |
#test_should_not_be_a_new_record ⇒ Object
19 20 21 |
# File 'lib/generators/test_unit/templates/oauth_nonce_test.rb', line 19 def test_should_not_be_a_new_record assert !@oauth_nonce.new_record? end |
#test_should_not_have_errors ⇒ Object
15 16 17 |
# File 'lib/generators/test_unit/templates/oauth_nonce_test.rb', line 15 def test_should_not_have_errors assert_equal [], @oauth_nonce.errors. end |
#test_shuold_not_allow_a_second_one_with_the_same_values ⇒ Object
23 24 25 |
# File 'lib/generators/test_unit/templates/oauth_nonce_test.rb', line 23 def test_shuold_not_allow_a_second_one_with_the_same_values assert_equal false, OauthNonce.remember(@oauth_nonce.nonce, @oauth_nonce.) end |