[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:21:14 UTC 2009


The following commit has been merged in the master branch:
commit d098a901745cf5c84731d8f46aabd225a6ffba2a
Author: Andrew Shafer <andrew at reductivelabs.com>
Date:   Fri Oct 3 12:09:38 2008 -0600

    Fix failing tests dependent on /etc/user_attr file existing

diff --git a/spec/unit/provider/user/user_role_add.rb b/spec/unit/provider/user/user_role_add.rb
index 87ad920..e9bd9a6 100644
--- a/spec/unit/provider/user/user_role_add.rb
+++ b/spec/unit/provider/user/user_role_add.rb
@@ -49,15 +49,14 @@ describe provider_class do
     end
 
     describe "when calling create" do
-        it "should use the add command when the user doesn't exist" do
-            @provider.stubs(:exists?).returns(false)
+        it "should use the add command when the user is not a role" do
+            @provider.stubs(:is_role?).returns(false)
             @provider.expects(:addcmd).returns("useradd")
             @provider.expects(:run)
             @provider.create
         end
 
         it "should use transition(normal) when the user is a role" do
-            @provider.stubs(:exists?).returns(true)
             @provider.stubs(:is_role?).returns(true)
             @provider.expects(:transition).with("normal")
             @provider.expects(:run)
@@ -103,6 +102,7 @@ describe provider_class do
     describe "when allow duplicate is enabled" do
         before do
             @resource.expects(:allowdupe?).returns true
+            @provider.stubs(:is_role?).returns(false)
             @provider.expects(:execute).with { |args| args.include?("-o") }
         end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list