Added integration test to verify a new repository

- Create repository
- Call GetSha1
- Call it a second time
- Verify the two responses are equal
This commit is contained in:
Roger Tinsley
2016-03-17 07:43:12 +00:00
parent d9fd0b7e2c
commit 64cea23bb7

View File

@@ -166,6 +166,17 @@ public class RepositoryCommitsClientTests
Assert.Equal(0, result.BehindBy);
}
[IntegrationTest]
public async Task GetShaFromRepository()
{
await CreateTheWorld();
var firstSha1 = await _fixture.GetSha1(Helper.UserName, _context.RepositoryName, "master");
var secondSha1 = await _fixture.GetSha1(Helper.UserName, _context.RepositoryName, "master");
Assert.Equal(firstSha1, secondSha1);
}
async Task CreateTheWorld()
{
var master = await _github.Git.Reference.Get(Helper.UserName, _context.RepositoryName, "heads/master");