From e90af2d5e502f685c7f8540e7d36ae8b45782013 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sat, 8 Mar 2014 11:58:32 +1100 Subject: [PATCH] added test for API throwing errors --- .../Clients/IssuesClientTests.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs index 8e2bf9c4..d274d4bb 100644 --- a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs @@ -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( + () => _issuesClient.GetForRepository(owner, _repository.Name, + new RepositoryIssueRequest { Creator = "some-random-account" })); + + AssertEx.Throws( + () => _issuesClient.GetForRepository(owner, _repository.Name, + new RepositoryIssueRequest { Assignee = "some-random-account" })); + } public void Dispose() {