From 53b2805242fa5fb8b877e65f410a2e33ac86b59d Mon Sep 17 00:00:00 2001 From: Lachlan Arthur Date: Thu, 30 Jul 2020 18:49:23 +1000 Subject: [PATCH] Update tests with correct arguments --- .../unit/plugins/synced_folders/smb/synced_folder_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/plugins/synced_folders/smb/synced_folder_test.rb b/test/unit/plugins/synced_folders/smb/synced_folder_test.rb index 888eee332..8f2205dcf 100644 --- a/test/unit/plugins/synced_folders/smb/synced_folder_test.rb +++ b/test/unit/plugins/synced_folders/smb/synced_folder_test.rb @@ -126,18 +126,18 @@ describe VagrantPlugins::SyncedFolderSMB::SyncedFolder do let(:host_caps){ [:smb_start, :smb_prepare, :smb_validate_password] } it "should validate the password" do - expect(host).to receive(:capability).with(:smb_validate_password, 'username', 'password').and_return(true) + expect(host).to receive(:capability).with(:smb_validate_password, machine, 'username', 'password').and_return(true) subject.prepare(machine, folders, options) end it "should retry when validation fails" do - expect(host).to receive(:capability).with(:smb_validate_password, 'username', 'password').and_return(false) - expect(host).to receive(:capability).with(:smb_validate_password, 'username', 'password').and_return(true) + expect(host).to receive(:capability).with(:smb_validate_password, machine, 'username', 'password').and_return(false) + expect(host).to receive(:capability).with(:smb_validate_password, machine, 'username', 'password').and_return(true) subject.prepare(machine, folders, options) end it "should raise an error if it exceeds the maximum number of retries" do - expect(host).to receive(:capability).with(:smb_validate_password, 'username', 'password').and_return(false). + expect(host).to receive(:capability).with(:smb_validate_password, machine, 'username', 'password').and_return(false). exactly(VagrantPlugins::SyncedFolderSMB::SyncedFolder::CREDENTIAL_RETRY_MAX).times expect{ subject.prepare(machine, folders, options) }.to raise_error(VagrantPlugins::SyncedFolderSMB::Errors::CredentialsRequestError) end