From 90b6bdba3a1bfe1f2aefa3ddc7ac539efaca9477 Mon Sep 17 00:00:00 2001 From: rms81 Date: Sun, 1 Feb 2015 17:47:00 +0000 Subject: [PATCH] Add unit test for GetAll --- Octokit.Tests/Clients/RepositoriesClientTests.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Octokit.Tests/Clients/RepositoriesClientTests.cs b/Octokit.Tests/Clients/RepositoriesClientTests.cs index b0ed782e..2185c0b7 100644 --- a/Octokit.Tests/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoriesClientTests.cs @@ -260,6 +260,21 @@ namespace Octokit.Tests.Clients } } + public class TheGetAllPublicMethod + { + [Fact] + public void RequestsTheCorrectUrlAndReturnsRepositories() + { + var connection = Substitute.For(); + var client = new RepositoriesClient(connection); + + client.GetAllPublic(); + + connection.Received() + .GetAll(Arg.Is(u => u.ToString() == "/repositories")); + } + } + public class TheGetAllForCurrentMethod { [Fact]