Sha256: 0904e1b58b2fdd4fe9563277a01d9df5e7cb09e05c3389383d43717e0d0c9064

Contents?: true

Size: 460 Bytes

Versions: 27

Compression:

Stored size: 460 Bytes

Contents

require 'test_plugin_helper'

class SaltModulesTest < ActiveSupport::TestCase
  setup do
    User.current = User.find_by_login 'admin'
  end

  test 'salt module has a valid name' do
    salt_module = ForemanSalt::SaltModule.new(:name => 'foo.bar.baz')
    assert_valid salt_module
  end

  test 'salt module has invalid name' do
    salt_module = ForemanSalt::SaltModule.new(:name => '&bad$name')
    refute_valid salt_module, :name, /alphanumeric/
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foreman_salt-10.1.0 test/unit/salt_modules_test.rb
foreman_salt-8.0.4 test/unit/salt_modules_test.rb
foreman_salt-9.0.1 test/unit/salt_modules_test.rb
foreman_salt-10.0.0 test/unit/salt_modules_test.rb
foreman_salt-9.0.0 test/unit/salt_modules_test.rb
foreman_salt-8.0.3 test/unit/salt_modules_test.rb
foreman_salt-8.0.2 test/unit/salt_modules_test.rb
foreman_salt-8.0.1 test/unit/salt_modules_test.rb
foreman_salt-7.0.3 test/unit/salt_modules_test.rb
foreman_salt-8.0.0 test/unit/salt_modules_test.rb
foreman_salt-7.0.2 test/unit/salt_modules_test.rb
foreman_salt-6.0.1 test/unit/salt_modules_test.rb
foreman_salt-7.0.1 test/unit/salt_modules_test.rb
foreman_salt-7.0.0 test/unit/salt_modules_test.rb
foreman_salt-6.0.0 test/unit/salt_modules_test.rb
foreman_salt-5.0.1 test/unit/salt_modules_test.rb
foreman_salt-5.0.0 test/unit/salt_modules_test.rb
foreman_salt-4.0.1 test/unit/salt_modules_test.rb
foreman_salt-4.0.0 test/unit/salt_modules_test.rb
foreman_salt-3.0.2 test/unit/salt_modules_test.rb