Sha256: ad09b7ed4a9efcccd29cca80dae760ca654bf58e474e14e05ffed73be10c3e72

Contents?: true

Size: 464 Bytes

Versions: 12

Compression:

Stored size: 464 Bytes

Contents

require 'spec_helper'

describe "AllowMassAssignment" do
  describe User do
    it { should allow_mass_assignment_of(:login) }
    it { should allow_mass_assignment_of(:email) }
    it { should allow_mass_assignment_of(:age) }
    it { should allow_mass_assignment_of(:password) }
    it { should allow_mass_assignment_of(:password) }
    it { should allow_mass_assignment_of(:role).as(:admin) }
    
    it { should_not allow_mass_assignment_of(:role) }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mongoid-rspec-1.8.2 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.8.1 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.8.0 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.7.0 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.6.0 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.5.6 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.5.5 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.5.4 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.5.3 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.5.1 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.5.0 spec/unit/allow_mass_assignment_spec.rb
mongoid-rspec-1.4.6 spec/unit/allow_mass_assignment_spec.rb