Sha256: 40b9e503d87e4528b6f87b33f40e3163c4aacd44a5111cd0b2c168aa18015df8
Contents?: true
Size: 1.01 KB
Versions: 7
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true require 'rails_helper' # Protected attributes are not supported by rails 5 if Rails.version.starts_with?('4') RSpec.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 { is_expected.to allow_mass_assignment_of(:email) } it { is_expected.to allow_mass_assignment_of(:password) } it { is_expected.to allow_mass_assignment_of(:password_confirmation) } it { is_expected.to allow_mass_assignment_of(:provider) } it { is_expected.to allow_mass_assignment_of(:uid) } it { is_expected.not_to allow_mass_assignment_of(:g5_access_token) } it { is_expected.to allow_mass_assignment_of(:current_password) } it { is_expected.to allow_mass_assignment_of(:updated_by) } end end
Version data entries
7 entries across 7 versions & 1 rubygems