Permalink
Browse files

Create a sha256 checksum if none is expected in the recipe.

  • Loading branch information...
1 parent c91144b commit 3e8edee5292a7469f4ed60e394831ccd600f5bd4 @bernd committed Oct 18, 2011
Showing with 5 additions and 3 deletions.
  1. +2 −0 lib/fpm/cookery/source_integrity_check.rb
  2. +3 −3 spec/source_integrity_check_spec.rb
@@ -33,6 +33,8 @@ def verify!
unless digest
@error = true
+ @digest = :sha256
+ @checksum_actual = build_checksum(@digest)
end
if @checksum_expected.to_s != @checksum_actual.to_s
@@ -35,16 +35,16 @@ def local_path
check.checksum_expected.must_equal nil
end
- it "has checksum_actual set to nil" do
- check.checksum_actual.must_equal nil
+ it "has checksum_actual set to the sha256 checksum" do
+ check.checksum_actual.must_equal '285a6b8098ecc9040ece8f621e37c20edba39545c5d195c4894f410ed9d44b22'
end
it "has filename set" do
check.filename.must_equal fixture_path('test-source-1.0.tar.gz')
end
it "has digest set to nil" do
- check.digest.must_equal nil
+ check.digest.must_equal :sha256
end
end

0 comments on commit 3e8edee

Please sign in to comment.