diff options
author | Ben Straub <bs@github.com> | 2014-02-25 03:31:00 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2014-05-14 14:37:09 +0400 |
commit | 469e6da79c9e83fad9cab001b3e6f4bc0c56fc89 (patch) | |
tree | e368a05bbd1a78b8c248237bed67b79fb976fe5a /LibGit2Sharp.Tests | |
parent | 556afd194dbdbc636ca36d232b75a638252fe6c9 (diff) |
Introduce repo.Revert(commit)
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r-- | LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj | 1 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/RevertFixture.cs | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj index 76d100e6..9c0809b2 100644 --- a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj +++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj @@ -65,6 +65,7 @@ <Compile Include="PatchStatsFixture.cs" /> <Compile Include="RefSpecFixture.cs" /> <Compile Include="EqualityFixture.cs" /> + <Compile Include="RevertFixture.cs" /> <Compile Include="SignatureFixture.cs" /> <Compile Include="FilterBranchFixture.cs" /> <Compile Include="RemoveFixture.cs" /> diff --git a/LibGit2Sharp.Tests/RevertFixture.cs b/LibGit2Sharp.Tests/RevertFixture.cs new file mode 100644 index 00000000..c2ad3881 --- /dev/null +++ b/LibGit2Sharp.Tests/RevertFixture.cs @@ -0,0 +1,19 @@ +using LibGit2Sharp.Tests.TestHelpers; +using Xunit; + +namespace LibGit2Sharp.Tests +{ + public class RevertFixture : BaseFixture + { + [Fact] + public void RevertDoesntCrash() + { + string path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + repo.Reset(ResetMode.Hard); + repo.Revert(repo.Head.Tip); + } + } + } +} |