introduce Account.Type property to represent whether account is user or organization

- This also changes SearchUsersRequest to use AccountSearchType as this is a slightly
different representation of the user/org role.
 - Added some tests to check existing API usage.
This commit is contained in:
Brendan Forster
2015-02-24 09:13:22 +09:30
parent 4f1dde078a
commit 620daa7ea2
12 changed files with 59 additions and 4 deletions
@@ -520,6 +520,20 @@ public class RepositoriesClientTests
Assert.Equal("https://github.com/Haacked/SeeGit.git", repository.CloneUrl);
Assert.False(repository.Private);
Assert.False(repository.Fork);
Assert.Equal(AccountType.User, repository.Owner.Type);
}
[IntegrationTest]
public async Task ReturnsOrganizationRepository()
{
var github = Helper.GetAuthenticatedClient();
var repository = await github.Repository.Get("octokit", "octokit.net");
Assert.Equal("https://github.com/octokit/octokit.net.git", repository.CloneUrl);
Assert.False(repository.Private);
Assert.False(repository.Fork);
Assert.Equal(AccountType.Organization, repository.Owner.Type);
}
[IntegrationTest]