added tests to catch regression

This commit is contained in:
Brendan Forster
2014-04-30 14:52:37 +08:00
parent 81fc84b962
commit c600ce832c
4 changed files with 43 additions and 3 deletions
@@ -1,4 +1,5 @@
using Octokit;
using System;
using Octokit;
using Octokit.Tests.Helpers;
using Xunit;
@@ -16,5 +17,13 @@ internal class SearchUsersRequestTests
// If I can cast this to a writeable collection, then that defeats the purpose of a read only.
AssertEx.IsReadOnlyCollection<string>(result);
}
[Fact]
public void SortNotSpecifiedByDefault()
{
var request = new SearchUsersRequest("shiftkey");
Assert.True(String.IsNullOrWhiteSpace(request.Sort));
Assert.False(request.Parameters.ContainsKey("sort"));
}
}
}