Add integration test for deletions

This commit is contained in:
2025-09-29 17:01:50 +02:00
parent 23788484d1
commit 6ceeb24982

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Octokit; using Octokit;
using Octokit.Tests.Integration; using Octokit.Tests.Integration;
@@ -144,6 +144,26 @@ public class TreeClientTests : IDisposable
Assert.Single(result.Tree); 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() public void Dispose()
{ {
_context.Dispose(); _context.Dispose();