Added Organization to code search (#1671) (#1672)

* Added Organization to code search (#1671)

* Added integration test (#1671) (#1672)

* Cant specify empty string, use parameterless ctor instead
Simplify test to check owner's login
This commit is contained in:
Daniel Perez
2017-09-11 14:26:32 +01:00
committed by Ryan Gribble
parent 90a18deef4
commit 2b28aa5bd7
3 changed files with 45 additions and 0 deletions
@@ -42,6 +42,23 @@ public class SearchClientTests
Assert.NotEmpty(repos.Items);
}
[IntegrationTest]
public async Task SearchForFilesInOrganization()
{
var request = new SearchCodeRequest()
{
Organization = "octokit",
FileName = "readme.md"
};
var searchResults = await _gitHubClient.Search.SearchCode(request);
foreach (var searchResult in searchResults.Items)
{
Assert.Equal("octokit", searchResult.Repository.Owner.Login);
}
}
[IntegrationTest]
public async Task SearchForFileNameInCode()
{