Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-01-23 13:16:56 +0400
committernulltoken <emeric.fermas@gmail.com>2013-01-23 14:11:48 +0400
commitc5bb01bc1078d794314e2fcb5fe51daf7428dd05 (patch)
tree1e4c4136e534595ae3307f78dc4b25f8f8d820f7
parent9a9f7d452c3a8232d57c6a5e25fe0dacce7df6de (diff)
Enhance checkout test coverage
-rw-r--r--LibGit2Sharp.Tests/CheckoutFixture.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/LibGit2Sharp.Tests/CheckoutFixture.cs b/LibGit2Sharp.Tests/CheckoutFixture.cs
index bc733776..b75c7a63 100644
--- a/LibGit2Sharp.Tests/CheckoutFixture.cs
+++ b/LibGit2Sharp.Tests/CheckoutFixture.cs
@@ -526,13 +526,17 @@ namespace LibGit2Sharp.Tests
repo.Index.Stage(fullPath);
repo.Commit("2nd commit", Constants.Signature, Constants.Signature);
+ Assert.False(repo.Info.IsHeadDetached);
+
initial.Checkout();
// Head should point at initial commit.
Assert.Equal(repo.Head.Tip, initialCommit);
Assert.False(repo.Index.RetrieveStatus().IsDirty);
+
// Verify that HEAD is detached.
Assert.Equal(repo.Refs["HEAD"].TargetIdentifier, initial.Tip.Sha);
+ Assert.True(repo.Info.IsHeadDetached);
}
}
@@ -552,7 +556,7 @@ namespace LibGit2Sharp.Tests
// Verify that HEAD is detached.
Assert.Equal(repo.Refs["HEAD"].TargetIdentifier, repo.Branches["origin/master"].Tip.Sha);
-
+ Assert.True(repo.Info.IsHeadDetached);
}
}