- Timestamp:
- Aug 1, 2017, 3:45:14 PM (9 years ago)
- Branches:
- debian/bullseye, debian/jessie
- Children:
- ce0f6a4
- Parents:
- bcf0be5 (diff), cd0f9cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/dig_spec.rb
rbcf0be5 rad28f83 2 2 3 3 describe 'dig' do 4 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }5 it { is_expected.to run.with_params('bad', []).and_raise_error(Puppet::ParseError) }6 it { is_expected.to run.with_params({}, 'bad').and_raise_error(Puppet::ParseError) }7 4 8 it { is_expected.to run.with_params({}, []).and_return({}) } 9 it { is_expected.to run.with_params({"a" => "b"}, ["a"]).and_return("b") } 10 it { is_expected.to run.with_params({"a" => {"b" => "c"}}, ["a", "b"]).and_return("c") } 11 it { is_expected.to run.with_params({}, ["a", "b"], "d").and_return("d") } 12 it { is_expected.to run.with_params({"a" => false}, ["a"]).and_return(false) } 5 it "should exist" do 6 expect(Puppet::Parser::Functions.function("dig")).to eq("function_dig") 7 end 8 9 it "should give a deprecation warning when called" do 10 scope.expects(:warning).with("dig() DEPRECATED: This function has been replaced in Puppet 4.5.0, please use dig44() for backwards compatibility or use the new version.") 11 scope.function_dig([{}, []]) 12 end 13 13 end
Note:
See TracChangeset
for help on using the changeset viewer.
