Sha256: 1a7f5428c81fce9226507f05907b0b9ce0da81444d7722bd4e74a5929fdb360c
Contents?: true
Size: 857 Bytes
Versions: 2
Compression:
Stored size: 857 Bytes
Contents
RSpec.describe Metasploit::Credential::Username, type: :model do it_should_behave_like 'Metasploit::Concern.run' context 'database' do context 'columns' do it_should_behave_like 'timestamp database columns' it { is_expected.to have_db_column(:username).of_type(:string).with_options(null: false) } end context 'indices' do it { is_expected.to 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 { is_expected.to allow_mass_assignment_of(:username) } end context 'validations' do context 'username' do it { is_expected.to validate_presence_of :username } it { is_expected.to validate_uniqueness_of :username } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
metasploit-credential-0.14.7 | spec/models/metasploit/credential/username_spec.rb |
metasploit-credential-0.14.6 | spec/models/metasploit/credential/username_spec.rb |