3 describe :go_md5 do # rubocop:disable RSpec/DescribeSymbol
4 before :all do # rubocop:disable RSpec/BeforeAfterAll
5 Puppet::Parser::Functions.autoloader.loadall
8 let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
10 example_md5 = File.read(fixtures('checksum', 'gocd.md5'))
12 it 'retreives file md5' do
13 url = 'https://gocd.lan/path/file.md5'
15 PuppetX::Bodeco::Util.stubs(:content).with(uri, username: 'user', password: 'pass').returns(example_md5)
16 expect(scope.function_go_md5(['user', 'pass', 'filea', url])).to eq '283158c7da8c0ada74502794fa8745eb'