Sha256: fdd185389eefb251ab6dd4a4dfdb8f9f91d7d7e4b5e9a7c73920a1286838c314

Contents?: true

Size: 831 Bytes

Versions: 1

Compression:

Stored size: 831 Bytes

Contents

require 'spec_helper'

describe Client do
  describe 'basic client instance' do
    subject { Client.create! :name => 'test', :redirect_uri => 'http://localhost:3000', :website => 'http://localhost' }
    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 validate_presence_of :redirect_uri }
    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 }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devise_oauth2_providable-0.3.8 spec/rails_app/spec/models/client_spec.rb