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)
- - (Object) 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
Instance Method Details
- (Object) setup
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 |
- (Object) test_should_be_valid
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 |
- (Object) test_should_not_be_a_new_record
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 |
- (Object) test_should_not_have_errors
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 |
- (Object) test_shuold_not_allow_a_second_one_with_the_same_values
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 |