summaryrefslogtreecommitdiff
path: root/test/authentication
diff options
context:
space:
mode:
authorKimmo Lehto <kimmo.lehto@kontena.io>2019-03-22 14:04:14 +0200
committerKimmo Lehto <kimmo.lehto@kontena.io>2019-03-22 14:04:14 +0200
commitaa9e6bbc64ff7c39c56508f59c48fe2ee58416bf (patch)
tree2ab11cb7c8fc4ad2457d223ba7cc564c183efedb /test/authentication
parentcf7a7d3dfceebf3b56f693fa960eb0e85d9cd8de (diff)
downloadnet-ssh-aa9e6bbc64ff7c39c56508f59c48fe2ee58416bf.tar.gz
Test
Diffstat (limited to 'test/authentication')
-rw-r--r--test/authentication/test_key_manager.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/authentication/test_key_manager.rb b/test/authentication/test_key_manager.rb
index 3d3104d..860851b 100644
--- a/test/authentication/test_key_manager.rb
+++ b/test/authentication/test_key_manager.rb
@@ -174,6 +174,12 @@ module Authentication
end
end
+ def test_sign_passes_password_prompt_to_key_factory
+ manager.known_identities[rsa] = { from: :file, file: "/first" }
+ Net::SSH::KeyFactory.expects(:load_private_key).with('/first', nil, true, prompt).returns(rsa)
+ manager.sign(rsa, "hello, world")
+ end
+
private
def stub_file_private_key(name, key, options = {})