summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@googlemail.com>2008-09-25 16:05:57 +0100
committerJames Turnbull <james@lovedthanlost.net>2008-09-30 22:23:08 +1000
commite6698c2b8624fe2c2bbeef594318e3e8d932d345 (patch)
tree7e3037cb6901bd252e6afe3b75dd97895d7306e8 /spec
parentaf8c70650b028a70ed50ac6c2bd7f4f00c17ae03 (diff)
Add warning and forcibly set to :md5 fixing #1564
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/type/file.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb
index fd790d678..552d284a7 100755
--- a/spec/unit/type/file.rb
+++ b/spec/unit/type/file.rb
@@ -41,6 +41,14 @@ describe Puppet::Type.type(:file) do
lambda { @file.retrieve }.should raise_error(Puppet::Error)
end
+ it "should always have a checksum type of md5" do
+ File.open(@path, "w") do |f| f.puts "foo" end
+ @file[:checksum] = :mtime
+ @file.property(:checksum).checktype.should == :md5
+ @file.property(:checksum).retrieve.should == "{md5}d3b07384d113edec49eaa6238ad5ff00"
+ @file.property(:checksum).getsum(:mtime).should == "{md5}d3b07384d113edec49eaa6238ad5ff00"
+ end
+
end
describe "when retrieving remote files" do