Sha256: 6a6cb91079aac090381f0ffbb1dff3638d06129f3e83e24445a7a7dac4dd7fcb
Contents?: true
Size: 806 Bytes
Versions: 35
Compression:
Stored size: 806 Bytes
Contents
#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../lib/puppettest') require 'puppettest' require 'puppet/network/rights' class TestRights < Test::Unit::TestCase include PuppetTest def setup super @store = Puppet::Network::Rights.new end def test_rights assert_raise(ArgumentError, "Did not fail on unknown right") { @store.allowed?(:write, "host.madstop.com", "0.0.0.0") } assert_nothing_raised { @store.newright(:write) } assert( ! @store.allowed?(:write, "host.madstop.com", "0.0.0.0"), "Defaulted to allowing access") assert_nothing_raised { @store[:write].info "This is a log message" } assert_logged(:info, /This is a log message/, "did not log from Rights") end end
Version data entries
35 entries across 35 versions & 3 rubygems