Ensure that Commit.Compare(..) sets MergeBaseCommit correctly.

MergeBaseCommit was spelled incorrectly in CompareResult causing Octokit to pass
"null" no matter what the comparison is. This commit makes MergedBaseCommit (the
previous spelling) obsolete, introduces MergeBaseCommit property and adds a test
to ensure that MergeBaseCommit is set properly in CompareResult.

In the test, I specifically compared a commit with itself since the test only
cares whether the property is filled correctly or not, it is not testing whether
the internal computation is correct or not.

Closes #1258.
This commit is contained in:
Kivanc Muslu
2016-04-11 10:29:05 -07:00
parent 750aed62f8
commit 5b72007ed4
2 changed files with 13 additions and 3 deletions
@@ -20,6 +20,13 @@ public class RepositoryCommitsClientTests
_fixture = client.Repository.Commit;
}
[IntegrationTest]
public async Task CanGetMergeBaseCommit()
{
var compareResult = await _fixture.Compare("octokit", "octokit.net", "65a22f4d2cff94a286ac3e96440c810c5509196f", "65a22f4d2cff94a286ac3e96440c810c5509196f");
Assert.NotNull(compareResult.MergeBaseCommit);
}
[IntegrationTest]
public async Task CanGetCommit()
{