mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 19:46:07 +00:00
add method for unit test
This commit is contained in:
@@ -300,6 +300,18 @@ namespace Octokit.Tests.Clients
|
||||
connection.Connection.Received().Put(Arg.Is<Uri>(u => u.ToString() == "teams/1/repos/org/repo"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AddOrUpdatePermission()
|
||||
{
|
||||
var connection = Substitute.For<IApiConnection>();
|
||||
var client = new TeamsClient(connection);
|
||||
var newPermission = new TeamRepositoryUpdate(PermissionType.Admin);
|
||||
|
||||
client.AddRepository(1, "org", "repo", newPermission);
|
||||
|
||||
connection.Connection.Received().Put(Arg.Is<Uri>(u => u.ToString() == "teams/1/repos/org/repo"), Arg.Any<object>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EnsureNonNullOrg()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user