-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from nodegit/git_remote_url
Added git_remote_url and git_remote_load
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var assert = require("assert"); | ||
var path = require("path"); | ||
|
||
describe("Repository", function() { | ||
var reposPath = path.resolve("test/repos/workdir/.git"); | ||
|
||
var Repository = require("../../lib/repository"); | ||
var Remote = require("../../lib/remote"); | ||
|
||
before(function() { | ||
var test = this; | ||
|
||
return Repository.open(reposPath).then(function(repository) { | ||
test.repository = repository; | ||
}); | ||
}); | ||
|
||
it("can read git remote url", function() { | ||
return Remote.load(this.repository, "origin").then(function(remote) { | ||
assert.ok(remote instanceof Remote); | ||
assert.equal(remote.url(), "https://github.com/nodegit/nodegit"); | ||
}); | ||
}); | ||
}); |