Skip to content

Commit c3fc124

Browse files
committed
Test the ssh support availability
1 parent d11729d commit c3fc124

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ObjectiveGitTests/Libgit2FeaturesSpec.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,20 @@
3131
expect(@(git_features & GIT_FEATURE_HTTPS)).to(beTruthy());
3232
});
3333

34-
xit(@"should be built with SSH enabled", ^{
34+
it(@"should be built with SSH enabled", ^{
3535
expect(@(git_features & GIT_FEATURE_SSH)).to(beTruthy());
3636
});
3737

38+
it(@"should have ssh memory credentials", ^{
39+
NSError *error;
40+
GTCredential *cred = [GTCredential credentialWithUserName:@"null" publicKeyString:@"pub" privateKeyString:@"priv" passphrase:@"pass" error:&error];
41+
42+
expect(cred).to(beNil());
43+
expect(error).notTo(beNil());
44+
NSError *underError = error.userInfo[NSUnderlyingErrorKey];
45+
expect(underError.code).to(equal(@(-1)));
46+
expect(underError.localizedDescription).to(equal(@"this version of libgit2 was not built with ssh memory credentials."));
47+
});
3848
});
3949

4050
QuickSpecEnd

0 commit comments

Comments
 (0)