mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 10:55:53 +00:00
Enable support for milestone-based issues queries (#1788)
* Added support for Milestone filter in SearchIssuesRequest * Fixed some styling issues to match with the style of the existing code * Wrap milestone value with double quotes as milestones can contain spaces * Allow milestone filter to contain double quotes * Ability to search by milestone exclusions * Moved the EscapeDoubleQuotes method to StringExtensions
This commit is contained in:
@@ -64,5 +64,30 @@ namespace Octokit.Tests.Helpers
|
||||
Assert.Equal(expected, template.ExpandUriTemplate(new { name = "example name.txt", label = "labeltext" }).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public class EscapeDoubleQuotesMethod
|
||||
{
|
||||
[Fact]
|
||||
public void EscapeDoubleQuotesReturnsNullForNullInput()
|
||||
{
|
||||
Assert.Equal(null, (null as string).EscapeDoubleQuotes());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EscapeDoubleQuotesReturnsInputWithoutDoubleQuotes()
|
||||
{
|
||||
string input = "some test input without double quotes in it";
|
||||
|
||||
Assert.Equal(input, input.EscapeDoubleQuotes());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EscapeDoubleQuotesEscapesAllDoubleQuotes()
|
||||
{
|
||||
string input = "\"test milestone\"";
|
||||
|
||||
Assert.Equal("\\\"test milestone\\\"", input.EscapeDoubleQuotes());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user