mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 19:00:47 +00:00
added test to ensure backwards compatible
This commit is contained in:
@@ -103,6 +103,25 @@ public class CommitStatusClientTests
|
||||
Assert.Equal(CommitState.Success, statuses[0].State);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task CanProvideACommitStatusWithoutRequiringAContext()
|
||||
{
|
||||
var commit = await SetupCommitForRepository(_client);
|
||||
|
||||
var status = new NewCommitStatus
|
||||
{
|
||||
State = CommitState.Pending,
|
||||
Description = "this is a test status"
|
||||
};
|
||||
|
||||
await _client.Repository.CommitStatus.Create(_owner, _repository.Name, commit.Sha, status);
|
||||
|
||||
var statuses = await _client.Repository.CommitStatus.GetAll(_owner, _repository.Name, commit.Sha);
|
||||
|
||||
Assert.Equal(1, statuses.Count);
|
||||
Assert.Null(statuses[0].Context);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task CanCreateStatusesForDifferentContexts()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user