Skip to content

Commit 7301dd3

Browse files
committed
Fix some mismatches between OID and SHA in tests
1 parent d1cc35d commit 7301dd3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ObjectiveGitTests/GTReferenceSpec.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
reference = [repository createReferenceNamed:testRefName fromOID:testRefOID message:nil error:&error];
6666
expect(reference).notTo(beNil());
6767
expect(reference.name).to(equal(testRefName));
68-
expect(reference.targetOID).to(equal(testRefOID.SHA));
68+
expect(reference.targetOID).to(equal(testRefOID));
6969
});
7070

7171
it(@"should be able to be renamed", ^{
@@ -74,7 +74,7 @@
7474
GTReference *renamedRef = [reference referenceByRenaming:newRefName error:NULL];
7575
expect(renamedRef).notTo(beNil());
7676
expect(renamedRef.name).to(equal(newRefName));
77-
expect(renamedRef.targetOID).to(equal(testRefOID.SHA));
77+
expect(renamedRef.targetOID).to(equal(testRefOID));
7878
});
7979

8080
it(@"should be able to change the target", ^{
@@ -83,7 +83,7 @@
8383
GTReference *updatedRef = [reference referenceByUpdatingTarget:newRefTarget message:nil error:NULL];
8484
expect(updatedRef).notTo(beNil());
8585
expect(updatedRef.name).to(equal(testRefName));
86-
expect(updatedRef.targetOID).to(equal(newRefTarget));
86+
expect(updatedRef.targetOID.SHA).to(equal(newRefTarget));
8787
});
8888
});
8989

@@ -119,7 +119,7 @@
119119

120120
void (^expectValidReference)(GTReference *ref, NSString *SHA, GTReferenceType type, NSString *name) = ^(GTReference *ref, NSString *SHA, GTReferenceType type, NSString *name) {
121121
expect(ref).notTo(beNil());
122-
expect(ref.targetOID).to(equal(SHA));
122+
expect(ref.targetOID.SHA).to(equal(SHA));
123123
expect(@(ref.referenceType)).to(equal(@(type)));
124124
expect(ref.name).to(equal(name));
125125
};

ObjectiveGitTests/GTRepositoryResetSpec.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
GTReference *head = [repository headReferenceWithError:&error];
7979
expect(head).notTo(beNil());
80-
expect(head.targetOID).to(equal(resetTargetSHA));
80+
expect(head.targetOID.SHA).to(equal(resetTargetSHA));
8181

8282
success = [repository resetToCommit:originalHeadCommit resetType:GTRepositoryResetTypeSoft error:&error];
8383
expect(@(success)).to(beTruthy());

ObjectiveGitTests/GTRepositorySpec.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
GTReference *head = [repository headReferenceWithError:&error];
103103
expect(head).notTo(beNil());
104104
expect(error).to(beNil());
105-
expect(head.targetOID).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
105+
expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
106106
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid)));
107107
});
108108

@@ -120,7 +120,7 @@
120120
GTReference *head = [repository headReferenceWithError:&error];
121121
expect(head).notTo(beNil());
122122
expect(error).to(beNil());
123-
expect(head.targetOID).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
123+
expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
124124
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid)));
125125
});
126126

@@ -183,7 +183,7 @@
183183
GTReference *head = [self.bareFixtureRepository headReferenceWithError:&error];
184184
expect(head).notTo(beNil());
185185
expect(error).to(beNil());
186-
expect(head.targetOID).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
186+
expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
187187
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid)));
188188
});
189189

@@ -418,7 +418,7 @@
418418

419419
GTReference *head = [repository headReferenceWithError:&error];
420420
expect(head).notTo(beNil());
421-
expect(head.targetOID).to(equal(resetTargetSHA));
421+
expect(head.targetOID.SHA).to(equal(resetTargetSHA));
422422

423423
success = [repository resetToCommit:originalHeadCommit resetType:GTRepositoryResetTypeSoft error:&error];
424424
expect(@(success)).to(beTruthy());

0 commit comments

Comments
 (0)