Fix "repositories" Uri's by removing leading slash - this caused the base address to have the /api/v3/ removed when talking to GHE???

This commit is contained in:
Ryan Gribble
2016-03-22 00:25:12 +10:00
parent 9e4435a6f5
commit 83bb3e37eb
3 changed files with 6 additions and 6 deletions
@@ -269,7 +269,7 @@ namespace Octokit.Tests.Clients
client.GetAllPublic();
connection.Received()
.GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "/repositories"));
.GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "repositories"));
}
}
@@ -285,7 +285,7 @@ namespace Octokit.Tests.Clients
client.GetAllPublic(new PublicRepositoryRequest(364));
connection.Received()
.GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "/repositories?since=364"));
.GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "repositories?since=364"));
}
[Fact]
@@ -297,7 +297,7 @@ namespace Octokit.Tests.Clients
client.GetAllPublic(new PublicRepositoryRequest(364));
connection.Received()
.GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "/repositories?since=364"));
.GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "repositories?since=364"));
}
}
@@ -163,7 +163,7 @@ namespace Octokit.Tests.Reactive
[Fact]
public async Task ReturnsEveryPageOfRepositories()
{
var firstPageUrl = new Uri("/repositories?since=364", UriKind.Relative);
var firstPageUrl = new Uri("repositories?since=364", UriKind.Relative);
var secondPageUrl = new Uri("https://example.com/page/2");
var firstPageLinks = new Dictionary<string, Uri> { { "next", secondPageUrl } };
IApiResponse<List<Repository>> firstPageResponse = new ApiResponse<List<Repository>>(
+2 -2
View File
@@ -25,7 +25,7 @@ namespace Octokit
/// </summary>
public static Uri AllPublicRepositories()
{
return "/repositories".FormatUri();
return "repositories".FormatUri();
}
/// <summary>
@@ -35,7 +35,7 @@ namespace Octokit
/// <param name="since">The integer ID of the last Repository that youve seen.</param>
public static Uri AllPublicRepositories(long since)
{
return "/repositories?since={0}".FormatUri(since);
return "repositories?since={0}".FormatUri(since);
}
/// <summary>