Sha256: c5ad1f23f07c4aabb142c5aac9475aebfc0be2857c5cb1b70f1ce170283f24b8

Contents?: true

Size: 644 Bytes

Versions: 13

Compression:

Stored size: 644 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'
require 'oauth/helper'

class ClientNoneTest < ActiveSupport::TestCase
  include OAuth::Helper
  
  def setup
    @oauth_nonce = OauthNonce.remember(generate_key,Time.now.to_i)
  end

  def test_should_be_valid
    assert @oauth_nonce.valid?
  end
  
  def test_should_not_have_errors
    assert_equal [], @oauth_nonce.errors.full_messages
  end
  
  def test_should_not_be_a_new_record
    assert !@oauth_nonce.new_record?
  end
  
  def test_shuold_not_allow_a_second_one_with_the_same_values
    assert_equal false, OauthNonce.remember(@oauth_nonce.nonce, @oauth_nonce.timestamp)
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
oauth-plugin-0.4.0.rc2 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.rc1 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre7 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre6 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre5 generators/oauth_provider/templates/oauth_nonce_test.rb
insrc-oauth-plugin-0.4.0.pre6 generators/oauth_provider/templates/oauth_nonce_test.rb
insrc-oauth-plugin-0.4.0.pre5 generators/oauth_provider/templates/oauth_nonce_test.rb
le1t0-oauth-plugin-0.3.14.001 generators/oauth_provider/templates/oauth_nonce_test.rb
le1t0-oauth-plugin-0.4.0.pre4.001 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre4 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre3 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre2 generators/oauth_provider/templates/oauth_nonce_test.rb
oauth-plugin-0.4.0.pre1 generators/oauth_provider/templates/oauth_nonce_test.rb