Sha256: 142d9823e85f4b8c4acb8bb6b5b26b3acaa084a40552ef77414555fa04c92720

Contents?: true

Size: 612 Bytes

Versions: 10

Compression:

Stored size: 612 Bytes

Contents

require 'spec_helper'

describe Devise::Oauth2Providable::Client do
  it { Devise::Oauth2Providable::Client.table_name.should == 'oauth2_clients' }

  describe 'basic client instance' do
    let(:client) { FactoryGirl.create :client }
    subject { client }
    it { should validate_presence_of :name }
    it { should validate_uniqueness_of :name }
    it { should validate_presence_of :website }
    it { should validate_uniqueness_of :identifier }
    it { should have_db_index(:identifier).unique(true) }
    it { should have_many :refresh_tokens }
    it { should have_many :authorization_codes }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
brycesch-devise_oauth2_providable-1.2.8 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.7 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.6 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.5 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.4 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.3 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.2 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.1 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.2.0 spec/models/client_spec.rb
brycesch-devise_oauth2_providable-1.1.7 spec/models/client_spec.rb