summaryrefslogtreecommitdiff
path: root/spec/unit/provider/sudoers/parsed_spec.rb
diff options
context:
space:
mode:
authorl <technik@omc.net>2011-06-24 12:25:58 +0200
committerl <technik@omc.net>2011-06-24 12:25:58 +0200
commit05966b889e84f58554979831118cce587c6235f9 (patch)
treefe39b593594256a82783cab71c950b5cfd831326 /spec/unit/provider/sudoers/parsed_spec.rb
parent9834ac9300528a6de203cec66c5defd272b72a6b (diff)
fixed bug that caused a parse-error on lines containing = ( closes #1 )
Diffstat (limited to 'spec/unit/provider/sudoers/parsed_spec.rb')
-rw-r--r--spec/unit/provider/sudoers/parsed_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/provider/sudoers/parsed_spec.rb b/spec/unit/provider/sudoers/parsed_spec.rb
index 1bcdfae..28ab80d 100644
--- a/spec/unit/provider/sudoers/parsed_spec.rb
+++ b/spec/unit/provider/sudoers/parsed_spec.rb
@@ -115,5 +115,18 @@ describe Puppet::Type.type(:sudoers).provider(:parsed) do
# test to_line
end
+
+ context "failing for commands containing =",:issue => 1 do
+ before do
+ @init_records = {:type => 'user_spec'}
+ end
+
+ it "can parse users and hosts for lines containing =" do
+ line = "root ALL=(ALL) NOPASSWD: /bin/grep --color=auto example /var/log/messages"
+ lambda{
+ @provider.parse_line(line)
+ }.should_not raise_error
+ end
+ end
end