summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-07-14 21:13:04 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-07-14 21:13:04 +0000
commit60ef57815050497110925283299efde2b7aafcd2 (patch)
tree0d4369666d8206ba89a45040201c9812e33021ab /test
parent53c2f0a4c93d51eed664761bc652e73ccf078a82 (diff)
Fixing the rest of #705, except for the env stuff, which I was not able to reproduce.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2697 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/types/cron.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ral/types/cron.rb b/test/ral/types/cron.rb
index be94463d2..75a10c6fc 100755
--- a/test/ral/types/cron.rb
+++ b/test/ral/types/cron.rb
@@ -487,6 +487,22 @@ class TestCron < Test::Unit::TestCase
"target did not default to user with crontab")
end
end
+
+ # #705 - make sure extra spaces don't screw things up
+ def test_spaces_in_command
+ string = "echo multiple spaces"
+ cron = @crontype.create(:name => "testing", :command => string)
+ assert_apply(cron)
+
+ cron.class.clear
+ cron = @crontype.create(:name => "testing", :command => string)
+ # Now make sure that it's correctly in sync
+ cron.provider.class.prefetch("testing" => cron)
+ properties = cron.retrieve
+ command, result = properties.find { |prop, value| prop.name == :command }
+ assert_equal(string, result, "Cron did not pick up extra spaces in command")
+ assert(command.insync?(string), "Command changed with multiple spaces")
+ end
end