diff options
author | Will Farrington <wfarr@github.com> | 2013-05-22 17:37:08 -0700 |
---|---|---|
committer | Will Farrington <wfarr@github.com> | 2013-05-22 17:37:08 -0700 |
commit | 5d5796a7d5da68b74b4325adb47a907b8579bb26 (patch) | |
tree | af177ec70d99dad8838230d17118c475c20be52d /spec | |
parent | 9a41f07e3b7f1ad44ac5260814867591f13a9d3e (diff) |
Update ipv6 examples
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb b/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb index bf3c966..c74e8cd 100644 --- a/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb +++ b/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb @@ -8,12 +8,12 @@ describe Puppet::Parser::Functions.function(:validate_ipv6_address) do describe "when calling validate_ipv6_address from puppet" do describe "when given IPv6 address strings" do it "should compile with one argument" do - Puppet[:code] = "validate_ipv6_address('3ffe:505:2')" + Puppet[:code] = "validate_ipv6_address('3ffe:0505:0002::')" scope.compiler.compile end it "should compile with multiple arguments" do - Puppet[:code] = "validate_ipv6_address('3ffe:505:2', '3ffe:505:1')" + Puppet[:code] = "validate_ipv6_address('3ffe:0505:0002::', '3ffe:0505:0001::')" scope.compiler.compile end end @@ -37,9 +37,11 @@ describe Puppet::Parser::Functions.function(:validate_ipv6_address) do end describe "when given numbers" do - it "should compile" do + it "should not compile" do Puppet[:code] = "validate_ipv6_address(1, 2)" - scope.compiler.compile + expect { + scope.compiler.compile + }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) end end |