mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 03:01:31 +00:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user