8000 Add Tests · libgit2/objective-git@3821527 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3821527

Browse files
committed
Add Tests
1 parent 000b9d5 commit 3821527

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ObjectiveGitTests/GTRepository+PullSpec.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,13 @@
255255
BOOL result = [localRepo pullBranch:masterBranch fromRemote:remote withOptions:nil error:&error progress:^(const git_transfer_progress *progress, BOOL *stop) {
256256
transferProgressed = YES;
257257
}];
258+
NSString *fileContents = [NSString stringWithContentsOfURL:[localRepo.fileURL URLByAppendingPathComponent:@"test.txt"] encoding:NSUTF8StringEncoding error:nil];
258259
expect(@(result)).to(beFalsy());
259260
expect(error.domain).to(equal(@"GTGitErrorDomain"));
260261
expect(error.userInfo[GTPullMergeConflictedFiles]).to(equal(@[@"test.txt"]));
262+
expect(fileContents).notTo(equal(@"TestLocal"));
263+
expect([localRepo mergeHeadEntriesWithError:nil]).to(equal(@[remoteCommit]));
264+
expect([localRepo preparedMessageWithError:nil]).to(beginWith(@"Merge commit"));
261265
expect(error.localizedDescription).to(equal(@"Merge conflict, Pull aborted."));
262266
expect(@(transferProgressed)).to(beTruthy());
263267
});

0 commit comments

Comments
 (0)
0