added test to ensure backwards compatible

This commit is contained in:
Brendan Forster
2014-05-17 12:27:30 +10:00
parent c8c8501488
commit dd923f3b45
@@ -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()
{