mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
Add integration test for deletions
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user