Unverified Commit c2fac2f9 authored by Tyler Wanek's avatar Tyler Wanek Committed by GitHub

Merge pull request #1325 from rcjsuen/annotated

Add tests for AnnotatedCommit
parents 443e3c49 88d70747
......@@ -67,4 +67,27 @@ describe("AnnotatedCommit", function() {
assert(id, annotatedCommit.id());
});
});
it("can lookup an AnnotatedCommit from a revspec", function() {
var test = this;
return AnnotatedCommit.fromRevspec(test.repository, "checkout-test")
.then(function(annotatedCommit) {
assert.equal(annotatedCommit.id().toString(),
"1729c73906bb8467f4095c2f4044083016b4dfde");
});
});
it("can lookup an AnnotatedCommit from a fetchhead", function() {
var test = this;
return AnnotatedCommit.fromFetchhead(test.repository,
"rev-walk",
"https://github.com/nodegit/test",
"32789a79e71fbc9e04d3eff7425e1771eb595150")
.then(function(annotatedCommit) {
assert.equal(annotatedCommit.id().toString(),
"32789a79e71fbc9e04d3eff7425e1771eb595150");
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment