Implement new Project Card archiving (#1842)

* add Archived to ProjectCard response
add Archived to ProjectCardUpdate
update integration tests

* Add ProjectCardRequest model and update GetAll calls to use it
Update unit tests
Update integration tests

* skip_branch_with_pr still ends up building the branch on the initial push, so let's only build master instead
This commit is contained in:
Ryan Gribble
2018-07-11 20:38:54 +10:00
committed by GitHub
parent 1515dc2a2f
commit 043e64b89f
13 changed files with 467 additions and 17 deletions
@@ -0,0 +1,28 @@
using Octokit;
using Xunit;
public class ProjectCardRequestTests
{
public class TheToParametersDictionaryMethod
{
[Fact]
public void ContainsSetValues()
{
var request = new ProjectCardRequest(ProjectCardArchivedStateFilter.All);
var parameters = request.ToParametersDictionary();
Assert.Equal("all", parameters["archived_state"]);
}
[Fact]
public void ReturnsDefaultValuesForDefaultRequest()
{
var request = new ProjectCardRequest();
var parameters = request.ToParametersDictionary();
Assert.Empty(parameters);
}
}
}