mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 03:30:34 +00:00
Fix async tests (#1631)
* Fix up Assert.ThrowsAsync tests to actually await the call * ... and it even picked up a missing null check... pay day!
This commit is contained in:
@@ -184,7 +184,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
Assert.Equal(created.Token, applicationAuthorization.Token);
|
||||
|
||||
await github.Authorization.Delete(created.Id);
|
||||
Assert.ThrowsAsync<NotFoundException>(() => github.Authorization.Get(created.Id));
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => github.Authorization.Get(created.Id));
|
||||
}
|
||||
|
||||
[BasicAuthenticationTest]
|
||||
@@ -210,7 +210,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
Assert.NotEqual(created.Token, applicationAuthorization.Token);
|
||||
|
||||
await github.Authorization.Delete(created.Id);
|
||||
Assert.ThrowsAsync<NotFoundException>(() => github.Authorization.Get(created.Id));
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => github.Authorization.Get(created.Id));
|
||||
}
|
||||
|
||||
[BasicAuthenticationTest]
|
||||
@@ -232,8 +232,8 @@ namespace Octokit.Tests.Integration.Clients
|
||||
var applicationClient = Helper.GetAuthenticatedApplicationClient();
|
||||
await applicationClient.Authorization.RevokeApplicationAuthentication(Helper.ClientId, created.Token);
|
||||
|
||||
Assert.ThrowsAsync<NotFoundException>(() => applicationClient.Authorization.CheckApplicationAuthentication(Helper.ClientId, created.Token));
|
||||
Assert.ThrowsAsync<NotFoundException>(() => github.Authorization.Get(created.Id));
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => applicationClient.Authorization.CheckApplicationAuthentication(Helper.ClientId, created.Token));
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => github.Authorization.Get(created.Id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user