Last change
on this file since 30960 was 30960, checked in by davidb, 8 years ago |
Switch to using Puppet to provision machine. Strongly based on files developed for spark-hdfs cluster
|
File size:
1.2 KB
|
Line | |
---|
1 | require 'spec_helper'
|
---|
2 |
|
---|
3 | describe 'validate_email_address' do
|
---|
4 | describe 'signature validation' do
|
---|
5 | it { is_expected.not_to eq(nil) }
|
---|
6 | it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
|
---|
7 | end
|
---|
8 |
|
---|
9 | describe 'valid inputs' do
|
---|
10 | it { is_expected.to run.with_params('[email protected]') }
|
---|
11 | it { is_expected.to run.with_params('[email protected]') }
|
---|
12 | end
|
---|
13 |
|
---|
14 | describe 'invalid inputs' do
|
---|
15 | it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /is not a string/) }
|
---|
16 | it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /is not a string/) }
|
---|
17 | it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /is not a string/) }
|
---|
18 | it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, /is not a valid email/) }
|
---|
19 | it { is_expected.to run.with_params('[email protected]', {}).and_raise_error(Puppet::ParseError, /is not a string/) }
|
---|
20 | it { is_expected.to run.with_params('[email protected]', true).and_raise_error(Puppet::ParseError, /is not a string/) }
|
---|
21 | it { is_expected.to run.with_params('[email protected]', 'one').and_raise_error(Puppet::ParseError, /is not a valid email/) }
|
---|
22 | end
|
---|
23 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.