mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
Add ApiOption overloads to methods on IRepositoryHooksClient (#1272)
This commit is contained in:
committed by
Brendan Forster
parent
a44feaa7c3
commit
190ccf04c2
@@ -1,7 +1,7 @@
|
||||
using NSubstitute;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using NSubstitute;
|
||||
using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Clients
|
||||
@@ -28,7 +28,28 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
client.Hooks.GetAll("fake", "repo");
|
||||
|
||||
connection.Received().GetAll<RepositoryHook>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/hooks"));
|
||||
connection.Received().GetAll<RepositoryHook>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/hooks"),
|
||||
Args.ApiOptions);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RequestsCorrectUrlWithApiOptions()
|
||||
{
|
||||
var connection = Substitute.For<IApiConnection>();
|
||||
var client = new RepositoriesClient(connection);
|
||||
|
||||
var options = new ApiOptions
|
||||
{
|
||||
PageCount = 1,
|
||||
PageSize = 1,
|
||||
StartPage = 1
|
||||
};
|
||||
|
||||
client.Hooks.GetAll("fake", "repo", options);
|
||||
|
||||
connection.Received(1)
|
||||
.GetAll<RepositoryHook>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/hooks"),
|
||||
options);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user