test(repository): add test for merge message

This commit is contained in:
Aleksey Kulikov 2021-09-10 10:44:35 +03:00
parent 628aa610d8
commit 188cdc4354

View file

@ -247,8 +247,12 @@ void main() {
final cherry = repo['5aecfa0fb97eadaac050ccb99f03c3fb65460ad4'] as Commit;
repo.cherryPick(cherry);
expect(repo.state, GitRepositoryState.cherrypick.value);
expect(repo.message, 'add another feature file\n');
final index = repo.index;
expect(index.conflicts, isEmpty);
// pretend we've done commit
repo.removeMessage();
expect(() => repo.message, throwsA(isA<LibGit2Error>()));
index.free();
});