Sha256: 8e0b30d5e2e2f9ede4eadd9e32e6f941d4637913c8e23e9b0aff1a9918e1ed52

Contents?: true

Size: 777 Bytes

Versions: 10

Compression:

Stored size: 777 Bytes

Contents

require 'spec_helper'

describe RefreshToken do
  describe 'basic refresh token instance' do
    subject do
      client = Client.create! :name => 'test', :redirect_uri => 'http://localhost:3000', :website => 'http://localhost'
      RefreshToken.create! :client => client
    end
    it { should validate_presence_of :token }
    it { should validate_uniqueness_of :token }
    it { should belong_to :user }
    it { should belong_to :client }
    it { should validate_presence_of :client }
    it { should validate_presence_of :expires_at }
    it { should have_many :access_tokens }
    it { should have_db_index :client_id }
    it { should have_db_index :user_id }
    it { should have_db_index(:token).unique(true) }
    it { should have_db_index :expires_at }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
devise_oauth2_providable-0.3.8 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.7 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.6 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.5 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.4 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.3 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.2 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.1 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.3.0 spec/rails_app/spec/models/refresh_token_spec.rb
devise_oauth2_providable-0.2.4 spec/rails_app/spec/models/refresh_token_spec.rb