forked from libgit2/objective-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLibgit2FeaturesSpec.m
46 lines (34 loc) · 1.03 KB
/
Libgit2FeaturesSpec.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// Libgit2FeaturesSpec.m
// ObjectiveGitFramework
//
// Created by Ben Chatelain on 7/6/15.
// Copyright (c) 2015 GitHub, Inc. All rights reserved.
//
@import ObjectiveGit;
@import Nimble;
@import Quick;
#import "QuickSpec+GTFixtures.h"
QuickSpecBegin(Libgit2FeaturesSpec)
describe(@"libgit", ^{
__block git_feature_t git_features = 0;
beforeEach(^{
git_features = git_libgit2_features();
});
it(@"should be built with THREADS enabled", ^{
expect(@(git_features & GIT_FEATURE_THREADS)).to(beTruthy());
});
it(@"should be built with HTTPS enabled", ^{
expect(@(git_features & GIT_FEATURE_HTTPS)).to(beTruthy());
});
it(@"should be built with SSH enabled", ^{
expect(@(git_features & GIT_FEATURE_SSH)).to(beTruthy());
});
it(@"should have ssh memory credentials", ^{
NSError *error;
GTCredential *cred = [GTCredential credentialWithUserName:@"null" publicKeyString:@"pub" privateKeyString:@"priv" passphrase:@"pass" error:&error];
expect(cred).notTo(beNil());
expect(error).to(beNil());
});
});
QuickSpecEnd