2016-05-31 16:48:46 +00:00
|
|
|
import "typings-test"
|
2016-06-01 00:31:29 +00:00
|
|
|
import "should";
|
|
|
|
import smartssh = require("../dist/index");
|
|
|
|
describe("smartssh",function(){
|
|
|
|
let testSshInstance:smartssh.SshInstance;
|
|
|
|
let testSshKey:smartssh.SshKey;
|
|
|
|
describe("SshInstance",function(){
|
|
|
|
it("should create a new SshInstance object from class",function(){
|
|
|
|
testSshInstance = new smartssh.SshInstance();
|
|
|
|
testSshInstance.should.be.instanceof(smartssh.SshInstance);
|
|
|
|
});
|
2016-06-01 00:48:38 +00:00
|
|
|
it("should accept a new SshKey object",function(){
|
|
|
|
testSshInstance.addKey(new smartssh.SshKey({
|
|
|
|
public:"somePublicKey",
|
|
|
|
private:"somePrivateKey",
|
|
|
|
host:"gitlab.com"
|
|
|
|
}));
|
|
|
|
testSshInstance.addKey(new smartssh.SshKey({
|
|
|
|
public:"somePublicKey",
|
|
|
|
private:"somePrivateKey",
|
|
|
|
host:"bitbucket.org"
|
|
|
|
}));
|
|
|
|
testSshInstance.addKey(new smartssh.SshKey({
|
|
|
|
public:"somePublicKey",
|
|
|
|
private:"somePrivateKey",
|
|
|
|
host:"github.com"
|
|
|
|
}));
|
|
|
|
});
|
2016-06-01 00:31:29 +00:00
|
|
|
it("should return an array of sshKeys",function(){
|
2016-06-01 00:48:38 +00:00
|
|
|
testSshInstance.getKeys();
|
|
|
|
});
|
2016-06-01 00:31:29 +00:00
|
|
|
})
|
|
|
|
})
|