Skip to content

Commit a9ca544

Browse files
Jérémie Piersonjeremie-pierson
authored andcommitted
Add spec test for new setting use_checksum_in_file_content
1 parent 4d671f4 commit a9ca544

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/integration/type/file_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,15 @@ def get_aces_for_path_by_sid(path, sid)
636636
catalog.apply
637637
end
638638

639+
it "should not give a deprecation warning when checksum are disabled in content" do
640+
Puppet[:use_checksum_in_file_content] = false
641+
expect(Puppet).not_to receive(:puppet_deprecation_warning)
642+
file = described_class.new(:path => path, :content => '{ABCD}X')
643+
catalog.add_resource file
644+
catalog.apply
645+
expect(File.read(file[:path])).to eq('{ABCD}X')
646+
end
647+
639648
with_digest_algorithms do
640649
it_should_behave_like "files are backed up", {} do
641650
let(:filebucket_digest) { method(:digest) }

0 commit comments

Comments
 (0)