Sha256: 9a885dc9eb9ad7eaf186b3352e2227763a50e7ced2ae19563f2c727197435279

Contents?: true

Size: 801 Bytes

Versions: 11

Compression:

Stored size: 801 Bytes

Contents

require 'spec_helper'

describe DeviseG5Authenticatable::Models::ProtectedAttributes do
  before do
    Dummy::Application.config.active_record.whitelist_attributes = true
  end

  after do
    Dummy::Application.config.active_record.whitelist_attributes = false
  end

  subject { model }

  let(:model_class) { User }
  let(:model) { model_class.new }

  it { should allow_mass_assignment_of(:email) }
  it { should allow_mass_assignment_of(:password) }
  it { should allow_mass_assignment_of(:password_confirmation) }
  it { should allow_mass_assignment_of(:provider) }
  it { should allow_mass_assignment_of(:uid) }
  it { should_not allow_mass_assignment_of(:g5_access_token) }
  it { should allow_mass_assignment_of(:current_password) }
  it { should allow_mass_assignment_of(:updated_by) }
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
devise_g5_authenticatable-0.3.0 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.5.beta spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.4 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.4.beta spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.3 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.2 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.1 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.2.0 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.1.3 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.1.2 spec/models/protected_attributes_spec.rb
devise_g5_authenticatable-0.1.1 spec/models/protected_attributes_spec.rb