File: generate_error_message_spec.rb

package info (click to toggle)
puppet-module-puppetlabs-haproxy 8.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 816 kB
  • sloc: ruby: 3,979; sh: 14; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 468 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

require 'spec_helper'

describe 'haproxy::generate_error_message' do
  it { is_expected.to run.with_params('Invalid IP address or hostname 2323.23.23').and_raise_error('Invalid IP address or hostname 2323.23.23') }
  it { is_expected.to run.with_params('Port 181400 is outside of range 1-65535').and_raise_error('Port 181400 is outside of range 1-65535') }
  it { is_expected.to run.with_params(nil).and_raise_error(StandardError) }
end