mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
Minor improvements to authorization tests (#2118)
Minor improvements to a couple of tests in TheGetOrCreateApplicationAuthenticationMethod to verify the interesting piece of the request object. This brings these tests into line with recent changes to tests in TheCheckApplicationAuthenticationMethod et.al.
This commit is contained in:
@@ -126,8 +126,9 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
authEndpoint.GetOrCreateApplicationAuthentication("clientId", "secret", data);
|
||||
|
||||
client.Received().Put<ApplicationAuthorization>(Arg.Is<Uri>(u => u.ToString() == "authorizations/clients/clientId"),
|
||||
Args.Object);
|
||||
client.Received().Put<ApplicationAuthorization>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "authorizations/clients/clientId"),
|
||||
Arg.Is<Object>(o => o.GetType().GetProperty("client_secret").GetValue(o).ToString() == "secret"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -141,7 +142,7 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
client.Received().Put<ApplicationAuthorization>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "authorizations/clients/clientId"),
|
||||
Args.Object,
|
||||
Arg.Is<Object>(o => o.GetType().GetProperty("client_secret").GetValue(o).ToString() == "secret"),
|
||||
"two-factor");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user