hercules-team/augeasproviders — pull request #116 by raphink (2014-06-06 10:28:05+00:00)
Title: pam: cannot remove all arguments of an entry

When setting arguments to `[]` for an entry, the provider doesn't remove them.

This requires to fix #100 first.

Here's a test that fails (in the `with full file` section):

it "should remove all arguments" do
apply!(Puppet::Type.type(:pam).new(
:title => "Remove type= from pwquality check",
:service => "system-auth",
:type => "password",
:control => "requisite",
:module => "pam_pwquality.so",
:arguments => [],
:target => target,
:provider => "augeas",
:ensure => "present"
))

aug_open(target, "Pam.lns") do |aug|
aug.match('./*[type="password" and module="pam_pwquality.so"]/argument').size.should == 0
end
end