Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / type_aliases / ip_address_v4_nosubnet_spec.rb
1 require 'spec_helper'
2
3 if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
4   describe 'Stdlib::IP::Address::V4::Nosubnet' do
5     describe 'accepts ipv4 addresses without subnets' do
6       [
7         '127.0.0.1',
8         '8.8.4.4',
9         '52.10.10.141',
10       ].each do |value|
11         describe value.inspect do
12           it { is_expected.to allow_value(value) }
13         end
14       end
15     end
16
17     describe 'rejects other values' do
18       [
19         '10.1.240.4/24',
20         '192.168.1',
21         'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210',
22         '12AB::CD30:192.168.0.1',
23       ].each do |value|
24         describe value.inspect do
25           it { is_expected.not_to allow_value(value) }
26         end
27       end
28     end
29   end
30 end