3 describe :artifactory_sha1 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_json = File.read(fixtures('checksum', 'artifactory.json'))
13 url = 'https://repo.jfrog.org/artifactory/api/storage/distributions/images/Artifactory_120x75.png'
15 PuppetX::Bodeco::Util.stubs(:content).with(uri).returns(example_json)
16 expect(scope.function_artifactory_sha1([url])).to eq 'a359e93636e81f9dd844b2dfb4b89fa876e5d4fa'