Sha256: 9673631822e806a76536d2b8df6e87352738401ff0f50042ce924790b6642286

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

Stored size: 543 Bytes

Contents

require 'spec_helper'
require 'doorkeeper/oauth/helpers/unique_token'

module Doorkeeper::OAuth::Helpers
  describe UniqueToken do
    let :generator do
      lambda { |size| "a" * size }
    end

    it "is able to customize the generator method" do
      token = UniqueToken.generate(:generator => generator)
      token.should == "a" * 32
    end

    it "is able to customize the size of the token" do
      token = UniqueToken.generate(:generator => generator, :size => 2)
      token.should == "aa"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
couchkeeper-0.6.7 spec/lib/oauth/helpers/unique_token_spec.rb