mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 12:03:19 +00:00
added test for API throwing errors
This commit is contained in:
committed by
Tim Sneed
parent
1c64f05f06
commit
e90af2d5e5
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit;
|
||||
using Octokit.Tests.Helpers;
|
||||
using Octokit.Tests.Integration;
|
||||
using Xunit;
|
||||
|
||||
@@ -211,7 +212,19 @@ public class IssuesClientTests : IDisposable
|
||||
Assert.Equal(0, unassignedIssues.Count);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task FilteringByInvalidAccountThrowsError()
|
||||
{
|
||||
var owner = _repository.Owner.Login;
|
||||
|
||||
AssertEx.Throws<ApiValidationException>(
|
||||
() => _issuesClient.GetForRepository(owner, _repository.Name,
|
||||
new RepositoryIssueRequest { Creator = "some-random-account" }));
|
||||
|
||||
AssertEx.Throws<ApiValidationException>(
|
||||
() => _issuesClient.GetForRepository(owner, _repository.Name,
|
||||
new RepositoryIssueRequest { Assignee = "some-random-account" }));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user