mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 02:45:32 +00:00
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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user