diff --git a/test/tests/checkout.js b/test/tests/checkout.js index e3815a35f..013681af6 100644 --- a/test/tests/checkout.js +++ b/test/tests/checkout.js @@ -108,6 +108,29 @@ describe("Checkout", function() { }); }); + it("can checkout a branch with a name that conflicts with a tag", function() { + var test = this; + var commit; + + return test.repository.getHeadCommit() + .then(function(headCommit) { + commit = headCommit; + return test.repository.createLightweightTag(commit.sha(), "conflict"); + }) + .then(function() { + return test.repository.createBranch("conflict", commit); + }) + .then(function() { + return test.repository.checkoutBranch("conflict"); + }) + .then(function() { + return test.repository.head(); + }) + .then(function(ref) { + assert.equal(ref.name(), "refs/heads/conflict"); + }); + }); + it("can checkout an index with conflicts", function() { var test = this;