diff --git a/Octokit.Tests.Integration/Clients/TreeClientTests.cs b/Octokit.Tests.Integration/Clients/TreeClientTests.cs index ac54e69b..46af32db 100644 --- a/Octokit.Tests.Integration/Clients/TreeClientTests.cs +++ b/Octokit.Tests.Integration/Clients/TreeClientTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Octokit; using Octokit.Tests.Integration; @@ -144,6 +144,26 @@ public class TreeClientTests : IDisposable Assert.Single(result.Tree); } + [IntegrationTest] + public async Task CanDeleteACreatedTreeWithRepositoryId() + { + var newTree = new NewTree(); + newTree.Tree.Add(new NewTreeItem + { + Type = TreeType.Blob, + Path = "README.md", + Sha = null, + Mode = FileMode.File + }); + + var tree = await _fixture.Create(_context.Repository.Id, newTree); + + var result = await _fixture.Get(_context.Repository.Id, tree.Sha); + + Assert.NotNull(result); + Assert.Empty(result.Tree); + } + public void Dispose() { _context.Dispose();