mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
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:
@@ -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>>(
|
||||
|
||||
@@ -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 you’ve seen.</param>
|
||||
public static Uri AllPublicRepositories(long since)
|
||||
{
|
||||
return "/repositories?since={0}".FormatUri(since);
|
||||
return "repositories?since={0}".FormatUri(since);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user