diff options
author | Dan Bode <bodepd@gmail.com> | 2010-11-02 09:51:54 -0500 |
---|---|---|
committer | Dan Bode <bodepd@gmail.com> | 2010-11-02 09:51:54 -0500 |
commit | 5deb81b88243458ad95942bf2bf6a52595677f05 (patch) | |
tree | ed519167c575171939bfc247750be35fbb41487a | |
parent | 6ee92b1ec04ed4cf7d50c3f68b4aeabdaf1b21c3 (diff) |
update tests, alias names must be all CAPS.
test for failures when alias names are not correct.
-rw-r--r-- | spec/unit/type/sudoers.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/type/sudoers.rb b/spec/unit/type/sudoers.rb index 39c4e0b..6b813b6 100644 --- a/spec/unit/type/sudoers.rb +++ b/spec/unit/type/sudoers.rb @@ -59,6 +59,7 @@ describe Puppet::Type.type(:sudoers) do describe "the user alias" do before(:each) do @alias_params = @init_params.merge({ + :name => 'NAME', :type => 'alias', :sudo_alias => 'Cmnd_Alias', :items => 'item1' @@ -101,6 +102,11 @@ describe Puppet::Type.type(:sudoers) do lambda { with(valid_params_with({:type => 'user_spec'}))}.should raise_error end end + describe 'name' do + it 'should only accept [A-Z]([A-Z][0-9]_)*' do + lambda { with(valid_params_with({:name => 'name'}))}.should raise_error(Puppet::Error) + end + end end describe 'sudo defaults' do |