mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
adding a test: TeamClient.AddMembership(..) using a real ApiConnection throws an ArgumentNullExceptionValue
This commit is contained in:
@@ -152,6 +152,22 @@ namespace Octokit.Tests.Clients
|
||||
Args.Object);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AllowsEmptyBody()
|
||||
{
|
||||
var connection = Substitute.For<IConnection>();
|
||||
|
||||
var apiConnection = new ApiConnection(connection);
|
||||
|
||||
var client = new TeamsClient(apiConnection);
|
||||
|
||||
await client.AddMembership(1, "user");
|
||||
|
||||
connection.Received().Put<Dictionary<string, string>>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "teams/1/memberships/user"),
|
||||
Arg.Is<string>(u => u == null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task EnsuresNonNullOrEmptyLogin()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user