Sha256: 1cf22dc7e41a7eeaff5332dad852f566c887161966808e52387a8cc3ef95afaa

Contents?: true

Size: 833 Bytes

Versions: 13

Compression:

Stored size: 833 Bytes

Contents

require 'spec_helper'

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

  describe 'basic client instance' do
    with :client
    subject { client }
    it { should validate_presence_of :name }
    it { should validate_uniqueness_of :name }
    it { should allow_mass_assignment_of :name }
    it { should validate_presence_of :website }
    it { should allow_mass_assignment_of :website }
    it { should allow_mass_assignment_of :redirect_uri }
    it { should validate_uniqueness_of :identifier }
    it { should have_db_index(:identifier).unique(true) }
    it { should_not allow_mass_assignment_of :identifier }
    it { should_not allow_mass_assignment_of :secret }
    it { should have_many :refresh_tokens }
    it { should have_many :authorization_codes }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
devise_oauth2_rails4-2.1.4 spec/models/client_spec.rb
devise_oauth2_rails4-2.1.3 spec/models/client_spec.rb
devise_oauth2_rails4-2.0.3 spec/models/client_spec.rb
devise_oauth2_rails4-2.1.0 spec/models/client_spec.rb
devise_oauth2_rails4-2.0.2 spec/models/client_spec.rb
devise_oauth2_rails4-2.0.1 spec/models/client_spec.rb
devise_oauth2_rails4-2.0.0 spec/models/client_spec.rb
devise_oauth2_rails4-1.1.8 spec/models/client_spec.rb
devise_oauth2_rails4-1.1.7 spec/models/client_spec.rb
devise_oauth2_rails4-1.1.6 spec/models/client_spec.rb
devise_oauth2_rails4-1.1.5 spec/models/client_spec.rb
devise_oauth2_rails4-1.1.4 spec/models/client_spec.rb
devise_oauth2_rails4-1.1.3 spec/models/client_spec.rb