diff --git a/Octokit.Tests/Clients/RepositoriesClientTests.cs b/Octokit.Tests/Clients/RepositoriesClientTests.cs index d995cffb..9d2d74af 100644 --- a/Octokit.Tests/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoriesClientTests.cs @@ -80,9 +80,9 @@ namespace Octokit.Tests.Clients async () => await client.Create(newRepository)); Assert.False(exception.OwnerIsOrganization); - Assert.Equal("haacked", exception.Owner); + Assert.Null(exception.Owner); Assert.Equal("aName", exception.RepositoryName); - Assert.Equal(new Uri("https://github.com/haacked/aName"), exception.ExistingRepositoryWebUrl); + Assert.Null(exception.ExistingRepositoryWebUrl); } [Fact] @@ -169,7 +169,7 @@ namespace Octokit.Tests.Clients Assert.Equal("illuminati", exception.Owner); Assert.Equal("aName", exception.RepositoryName); Assert.Equal(new Uri("https://github.com/illuminati/aName"), exception.ExistingRepositoryWebUrl); - Assert.Equal("There is already a repository named 'aName' in the organization 'illuminati'", + Assert.Equal("There is already a repository named 'aName' in the organization 'illuminati'.", exception.Message); } diff --git a/Octokit/Exceptions/RepositoryExistsException.cs b/Octokit/Exceptions/RepositoryExistsException.cs index 4658426d..9d19bbdd 100644 --- a/Octokit/Exceptions/RepositoryExistsException.cs +++ b/Octokit/Exceptions/RepositoryExistsException.cs @@ -38,7 +38,7 @@ namespace Octokit Ensure.ArgumentNotNullOrEmptyString(name, "repositoryName"); Ensure.ArgumentNotNull(baseAddress, "baseAddress"); - Owner = owner ?? ""; // TODO: this is a total hack + Owner = owner; RepositoryName = name; OwnerIsOrganization = !String.IsNullOrWhiteSpace(owner); var webBaseAddress = baseAddress.Host != GitHubClient.GitHubApiUrl.Host