|
5 | 5 | describe 'validate_email_address' do |
6 | 6 | describe 'signature validation' do |
7 | 7 | it { is_expected.not_to eq(nil) } |
8 | | - it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } |
| 8 | + it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{wrong number of arguments}i) } |
9 | 9 | end |
10 | 10 |
|
11 | 11 | describe 'valid inputs' do |
|
14 | 14 | end |
15 | 15 |
|
16 | 16 | describe 'invalid inputs' do |
17 | | - it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{is not a string}) } |
18 | | - it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{is not a string}) } |
19 | | - it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, %r{is not a string}) } |
20 | | - it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{is not a valid email}) } |
21 | | - it { is_expected.to run.with_params('[email protected]', {}).and_raise_error(Puppet::ParseError, %r{is not a string}) } |
22 | | - it { is_expected.to run.with_params('[email protected]', true).and_raise_error(Puppet::ParseError, %r{is not a string}) } |
23 | | - it { is_expected.to run.with_params('[email protected]', 'one').and_raise_error(Puppet::ParseError, %r{is not a valid email}) } |
| 17 | + it { is_expected.to run.with_params({}).and_raise_error(ArgumentError, %r{got Hash}) } |
| 18 | + it { is_expected.to run.with_params(1).and_raise_error(ArgumentError, %r{got Integer}) } |
| 19 | + it { is_expected.to run.with_params(true).and_raise_error(ArgumentError, %r{got Boolean}) } |
| 20 | + it { is_expected.to run.with_params('one').and_raise_error(ArgumentError, %r{got 'one'}) } |
| 21 | + it { is_expected.to run.with_params('[email protected]', {}).and_raise_error(ArgumentError, %r{got Hash}) } |
| 22 | + it { is_expected.to run.with_params('[email protected]', true).and_raise_error(ArgumentError, %r{got Boolean}) } |
| 23 | + it { is_expected.to run.with_params('[email protected]', 'one').and_raise_error(ArgumentError, %r{got 'one'}) } |
24 | 24 | end |
25 | 25 | end |
0 commit comments