diff options
-rw-r--r-- | spec/unit/provider/user/user_role_add.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/user/user_role_add.rb b/spec/unit/provider/user/user_role_add.rb index 87ad92049..e9bd9a68f 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 |