mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 22:25:12 +00:00
Tested out all of the existing Pull Request code
Still missing integration tests for Pull Requests, though. I need to do a bit more research before I can start to tackle that one.
This commit is contained in:
committed by
Brendan Forster
parent
dd220d7bf9
commit
c81d8d08f7
35
Octokit.Tests/Models/PullRequestRequestTests.cs
Normal file
35
Octokit.Tests/Models/PullRequestRequestTests.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Octokit;
|
||||
using Xunit;
|
||||
|
||||
public class PullRequestRequestTests
|
||||
{
|
||||
public class TheToParametersDictionaryMethod
|
||||
{
|
||||
[Fact]
|
||||
public void ContainsSetValues()
|
||||
{
|
||||
var request = new PullRequestRequest
|
||||
{
|
||||
State = ItemState.Closed,
|
||||
Head = "user:ref-name",
|
||||
Base = "fake_base_branch"
|
||||
};
|
||||
|
||||
var parameters = request.ToParametersDictionary();
|
||||
|
||||
Assert.Equal("closed", parameters["state"]);
|
||||
Assert.Equal("user:ref-name", parameters["head"]);
|
||||
Assert.Equal("fake_base_branch", parameters["base"]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReturnsDefaultValuesForDefaultRequest()
|
||||
{
|
||||
var request = new PullRequestRequest();
|
||||
|
||||
var parameters = request.ToParametersDictionary();
|
||||
|
||||
Assert.Equal("open", parameters["state"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user