Skip to content

Commit de6772e

Browse files
author
John Haley
committed
Fixed remote tests
1 parent 8784b08 commit de6772e

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

lib/remote.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ var lookupWrapper = require("./util/lookupWrapper");
55
var Remote = NodeGit.Remote;
66
var setCallbacks = Remote.prototype.setCallbacks;
77

8-
Remote.prototype.setCallbacks = function(callbacks) {
9-
callbacks = normalizeOptions(callbacks, NodeGit.RemoteCallbacks);
10-
11-
return setCallbacks.call(this, callbacks);
12-
};
13-
148
/**
159
* Retrieves the remote by name
1610
* @param {Repository} repo The repo that the remote lives in
@@ -20,4 +14,10 @@ Remote.prototype.setCallbacks = function(callbacks) {
2014
*/
2115
Remote.lookup = lookupWrapper(Remote);
2216

17+
Remote.prototype.setCallbacks = function(callbacks) {
18+
callbacks = normalizeOptions(callbacks, NodeGit.RemoteCallbacks);
19+
20+
return setCallbacks.call(this, callbacks);
21+
};
22+
2323
module.exports = Remote;

test/tests/remote.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,8 @@ describe("Remote", function() {
8383
var repository = this.repository;
8484

8585
return Remote.create(repository, "origin3", url)
86-
.then(function() {
87-
})
8886
.then(function(remote) {
89-
remote.delete();
90-
})
91-
.then(function() {
87+
Remote.delete(repository, "origin3");
9288
return Remote.lookup(repository, "origin3");
9389
})
9490
.then(Promise.reject, Promise.resolve);
@@ -132,8 +128,11 @@ describe("Remote", function() {
132128
return this.repository.fetchAll({
133129
credentials: function(url, userName) {
134130
return NodeGit.Cred.sshKeyFromAgent(userName);
131+
},
132+
certificateCheck: function() {
133+
return 1;
135134
}
136-
}, true);
135+
});
137136
});
138137

139138
});

0 commit comments

Comments
 (0)