Skip to content

Commit

Permalink
adding a test: TeamClient.AddMembership(..) using a real ApiConnectio…
Browse files Browse the repository at this point in the history
…n throws an ArgumentNullExceptionValue
  • Loading branch information
davidalpert committed Jul 31, 2015
1 parent a7bc09e commit 31aab69
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Octokit.Tests/Clients/TeamsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,22 @@ public async Task RequestsTheCorrectUrl()
Args.Object);
}

[Fact]
public async void DoesNotFailWithAnArgumentNullExceptionValue()
{
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()
{
Expand Down

0 comments on commit 31aab69

Please sign in to comment.