mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
Double quote issue labels in search API (#2084)
This commit is contained in:
@@ -962,7 +962,7 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
connection.Received().Get<SearchIssuesResult>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
|
||||
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+label:bug"));
|
||||
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+label:\"bug\""));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -977,7 +977,7 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
connection.Received().Get<SearchIssuesResult>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
|
||||
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+label:bug+label:feature"));
|
||||
Arg.Is<Dictionary<string, string>>(d => d["q"] == "something+label:\"bug\"+label:\"feature\""));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -1560,7 +1560,7 @@ namespace Octokit.Tests.Clients
|
||||
connection.Received().Get<SearchIssuesResult>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "search/issues"),
|
||||
Arg.Is<Dictionary<string, string>>(d => d["q"] ==
|
||||
"something+label:bug+user:alfhenrik+repo:octokit/octokit.net"));
|
||||
"something+label:\"bug\"+user:alfhenrik+repo:octokit/octokit.net"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,9 +114,9 @@ public class SearchIssuesRequestTests
|
||||
var request = new SearchIssuesRequest("test");
|
||||
Assert.DoesNotContain(request.MergedQualifiers(), x => x.Contains("label:"));
|
||||
|
||||
request.Labels = new[] { "label1", "label2" };
|
||||
Assert.Contains("label:label1", request.MergedQualifiers());
|
||||
Assert.Contains("label:label2", request.MergedQualifiers());
|
||||
request.Labels = new[] { "label1", "label 2" };
|
||||
Assert.Contains("label:\"label1\"", request.MergedQualifiers());
|
||||
Assert.Contains("label:\"label 2\"", request.MergedQualifiers());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -328,7 +328,7 @@ namespace Octokit
|
||||
|
||||
if (Labels != null)
|
||||
{
|
||||
parameters.AddRange(Labels.Select(label => string.Format(CultureInfo.InvariantCulture, "label:{0}", label)));
|
||||
parameters.AddRange(Labels.Select(label => string.Format(CultureInfo.InvariantCulture, "label:\"{0}\"", label)));
|
||||
}
|
||||
|
||||
if (No.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user