spec/functions/validate_ip_addr_spec.rb
raw| 1 | # frozen_string_literal: true |
| 2 | |
| 3 | require 'spec_helper' |
| 4 | |
| 5 | describe 'haproxy::validate_ip_addr' do |
| 6 | it { is_expected.to run.with_params('10.0.0.10').and_return(true) } |
| 7 | it { is_expected.to run.with_params('256.168.0.1').and_return(false) } |
| 8 | it { is_expected.to run.with_params(nil).and_raise_error(StandardError) } |
| 9 | end |