Sha256: f8fbdd32545170a23d93e66635bb1ec82d93b1ed0b467c07018fa83e42e15cbd
Contents?: true
Size: 820 Bytes
Versions: 24
Compression:
Stored size: 820 Bytes
Contents
require 'spec_helper' describe Metasploit::Credential::Username do it_should_behave_like 'Metasploit::Concern.run' context 'database' do context 'columns' do it_should_behave_like 'timestamp database columns' it { should have_db_column(:username).of_type(:string).with_options(null: false) } end context 'indices' do it { should have_db_index(:username).unique(true) } end end context 'mass assignment security' do it { should_not allow_mass_assignment_of(:created_at) } it { should_not allow_mass_assignment_of(:updated_at) } it { should allow_mass_assignment_of(:username) } end context 'validations' do context 'username' do it { should validate_presence_of :username } it { should validate_uniqueness_of :username } end end end
Version data entries
24 entries across 24 versions & 1 rubygems