Sha256: 4e152cbe987b8c559a997b966a9ab62c671393c27ae917ac17ca1094e21571c3

Contents?: true

Size: 694 Bytes

Versions: 33

Compression:

Stored size: 694 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 'validations' do
    context 'username' do
      subject { FactoryBot.build(:metasploit_credential_username) }
      it { is_expected.to validate_presence_of :username }
      it { is_expected.to validate_uniqueness_of :username }
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
metasploit-credential-6.0.11 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.10 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.9 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.8 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.7 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.6 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.5 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.4 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.3 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.2 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.1 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-6.0.0 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.9 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.8 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.7 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.6 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.5 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.4 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.3 spec/models/metasploit/credential/username_spec.rb
metasploit-credential-5.0.2 spec/models/metasploit/credential/username_spec.rb