Sha256: b3d2a1c4c1e62e379408bde3a58eaed2d8b29295171edcd362a514175d39e8d7

Contents?: true

Size: 446 Bytes

Versions: 14

Compression:

Stored size: 446 Bytes

Contents

require 'test_plugin_helper'

class SaltModulesTest < ActiveSupport::TestCase
  setup do
    User.current = users :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

14 entries across 14 versions & 1 rubygems

Version Path
foreman_salt-14.0.0 test/unit/salt_modules_test.rb
foreman_salt-13.2.4 test/unit/salt_modules_test.rb
foreman_salt-13.2.3 test/unit/salt_modules_test.rb
foreman_salt-13.2.2 test/unit/salt_modules_test.rb
foreman_salt-13.2.1 test/unit/salt_modules_test.rb
foreman_salt-13.2.0 test/unit/salt_modules_test.rb
foreman_salt-13.1.0 test/unit/salt_modules_test.rb
foreman_salt-13.0.0 test/unit/salt_modules_test.rb
foreman_salt-12.0.0 test/unit/salt_modules_test.rb
foreman_salt-11.0.1 test/unit/salt_modules_test.rb
foreman_salt-11.0.0 test/unit/salt_modules_test.rb
foreman_salt-10.3.1 test/unit/salt_modules_test.rb
foreman_salt-10.3.0 test/unit/salt_modules_test.rb
foreman_salt-10.2.0 test/unit/salt_modules_test.rb