Update mcollective.init according to OSCI-855
[packages/precise/mcollective.git] / spec / unit / plugins / mcollective / validator / ipv6address_validator_spec.rb
1 #!/usr/bin/env rspec
2 require 'spec_helper'
3 require File.dirname(__FILE__) + '/../../../../../plugins/mcollective/validator/ipv6address_validator.rb'
4
5 module MCollective
6   module Validator
7     describe "#validate" do
8       it "should raise an exception if the supplied value is not an ipv6 address" do
9         expect{
10           Ipv6addressValidator.validate("foobar")
11         }.to raise_error(ValidatorError, "value should be an ipv6 address")
12       end
13
14       it "should not raise an exception if the supplied value is an ipv6 address" do
15         Ipv6addressValidator.validate("2001:db8:85a3:8d3:1319:8a2e:370:7348")
16       end
17     end
18   end
19 end