Sha256: 04cd44ee9cb8c830c9da8cf4114c92b358378acd7e1b969e9c2870a89b07c97d

Contents?: true

Size: 618 Bytes

Versions: 48

Compression:

Stored size: 618 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'oauth/helper'
describe OauthNonce do
  include OAuth::Helper
  before(:each) do
    @oauth_nonce = OauthNonce.remember(generate_key, Time.now.to_i)
  end

  it "should be valid" do
    @oauth_nonce.should be_valid
  end
  
  it "should not have errors" do
    @oauth_nonce.errors.full_messages.should == []
  end
  
  it "should not be a new record" do
    @oauth_nonce.should_not be_new_record
  end
  
  it "should not allow a second one with the same values" do
    OauthNonce.remember(@oauth_nonce.nonce,@oauth_nonce.timestamp).should == false
  end
end

Version data entries

48 entries across 48 versions & 6 rubygems

Version Path
filiptepper-oauth-plugin-0.3.11 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.10 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.11 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.5 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.6 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.7 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.8 generators/oauth_provider/templates/oauth_nonce_spec.rb
pelle-oauth-plugin-0.3.9 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.rc2 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.rc1 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.pre7 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.pre6 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.pre5 generators/oauth_provider/templates/oauth_nonce_spec.rb
insrc-oauth-plugin-0.4.0.pre6 generators/oauth_provider/templates/oauth_nonce_spec.rb
insrc-oauth-plugin-0.4.0.pre5 generators/oauth_provider/templates/oauth_nonce_spec.rb
le1t0-oauth-plugin-0.3.14.001 generators/oauth_provider/templates/oauth_nonce_spec.rb
le1t0-oauth-plugin-0.4.0.pre4.001 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.pre4 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.pre3 generators/oauth_provider/templates/oauth_nonce_spec.rb
oauth-plugin-0.4.0.pre2 generators/oauth_provider/templates/oauth_nonce_spec.rb