now can work with remotes

This commit is contained in:
2016-07-04 03:49:24 +02:00
parent 9ae3acb3d8
commit 7e2481d511
16 changed files with 185 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ let paths = {
describe("smartgit",function(){
describe(".clone",function(){
it("should clone a repository using ssh and sshkey",function(done){
this.timeout(20000);
this.timeout(40000);
smartgit.clone({
from:"git@gitlab.com:sandboxzone/sandbox-testrepo.git",
to:paths.temp
@@ -25,7 +25,7 @@ describe("smartgit",function(){
});
});
it("should clone a repository using https",function(done){
this.timeout(20000);
this.timeout(40000);
smartgit.clone({
from:"https://gitlab.com/sandboxzone/sandbox-testrepo.git",
to:paths.temp2
@@ -60,7 +60,7 @@ describe("smartgit",function(){
})
});
describe("pull",function(){
this.timeout(20000);
this.timeout(40000);
it("should error for noGit",function(){
smartgit.pull(paths.noGit);
});
@@ -68,4 +68,18 @@ describe("smartgit",function(){
smartgit.pull(paths.temp);
})
});
describe("remote",function(){
it("should error for noGit",function(){
smartgit.remote.add(paths.noGit,null,null);
});
it("should error for no remote name",function(){
smartgit.remote.add(paths.temp,null,null);
});
it("should error for no remote link",function(){
smartgit.remote.add(paths.temp,"origin",null);
});
it("should add a remote",function(){
smartgit.remote.add(paths.temp,"origin2","https://github.com/pushrocks/somerepo");
});
});
});