summaryrefslogtreecommitdiff
path: root/spec/unit/knife/user_password_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/knife/user_password_spec.rb')
-rw-r--r--spec/unit/knife/user_password_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/unit/knife/user_password_spec.rb b/spec/unit/knife/user_password_spec.rb
index d582801780..853e21cd6d 100644
--- a/spec/unit/knife/user_password_spec.rb
+++ b/spec/unit/knife/user_password_spec.rb
@@ -31,7 +31,6 @@ describe Chef::Knife::UserPassword do
@password = "abc123"
@user = double("Chef::User")
allow(@user).to receive(:root_rest).and_return(root_rest)
- allow(Chef::User).to receive(:new).and_return(@user)
@key = "You don't come into cooking to get rich - Ramsay"
end
@@ -44,7 +43,7 @@ describe Chef::Knife::UserPassword do
result = { "password" => [], "recovery_authentication_enabled" => true }
allow(@user).to receive(:[]).with("organization")
- expect(Chef::ServerAPI).to receive(:new).with(Chef::Config[:chef_server_url], { api_version: "2" }).and_return(root_rest)
+ expect(Chef::ServerAPI).to receive(:new).with(Chef::Config[:chef_server_url], { api_version: "1" }).and_return(root_rest)
expect(@user.root_rest).to receive(:get).with("users/#{@user_name}").and_return(result)
expect(@user.root_rest).to receive(:put).with("users/#{@user_name}", result)
expect(@knife.ui).to receive(:msg).with("Authentication info updated for #{@user_name}.")