8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e4570b commit b89af27Copy full SHA for b89af27
ObjectiveGitTests/GTUtilityFunctions.m
@@ -40,11 +40,10 @@
40
#pragma mark - Branch
41
42
BranchBlock localBranchWithName = ^ GTBranch * (NSString *branchName, GTRepository *repo) {
43
- NSString *reference = [GTBranch.localNamePrefix stringByAppendingString:branchName];
44
- NSArray *branches = [repo branchesWithPrefix:reference error:NULL];
45
- expect(branches).notTo(beNil());
46
- expect(@(branches.count)).to(equal(@1));
47
- expect(((GTBranch *)branches[0]).shortName).to(equal(branchName));
+ BOOL success = NO;
+ GTBranch *branch = [repo lookUpBranchWithName:branchName type:GTBranchTypeLocal success:&success error:NULL];
+ expect(branch).notTo(beNil());
+ expect(branch.shortName).to(equal(branchName));
48
49
- return branches[0];
+ return branch;
50
};
0 commit comments