From 09ef69c84315b10d250c6b327c6948d855e42112 Mon Sep 17 00:00:00 2001 From: Haroon Date: Wed, 30 Apr 2014 10:29:45 +0100 Subject: [PATCH] improve test --- Octokit.Tests/Clients/SearchClientTests.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Octokit.Tests/Clients/SearchClientTests.cs b/Octokit.Tests/Clients/SearchClientTests.cs index 8897a048..c06813fa 100644 --- a/Octokit.Tests/Clients/SearchClientTests.cs +++ b/Octokit.Tests/Clients/SearchClientTests.cs @@ -617,12 +617,16 @@ namespace Octokit.Tests.Clients { var connection = Substitute.For(); var client = new SearchClient(connection); - //get repos where search contains 'github' and sort field is forks var request = new SearchRepositoriesRequest("github"); request.SortField = RepoSearchSort.Stars; + client.SearchRepo(request); - connection.Received().Get(Arg.Is(u => u.ToString() == "search/repositories"), - Arg.Is>(d => d["sort"] == "Stars")); + + connection.Received().Get( + Arg.Is(u => u.ToString() == "search/repositories"), + Arg.Is>(d => + d["q"] == "github" && + d["sort"] == "stars")); } }