File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,6 @@ branches:
2323 only :
2424 - master
2525script : npm --expose-gc test
26+ notifications :
27+ slack :
28+ secure : KglNSqZiid9YudCwkPFDh+sZfW5BwFlM70y67E4peHwwlbbV1sSBPHcs74ZHP/lqgEZ4hMv4N2NI58oYFD5/1a+tKIQP1TkdIMuq4j2LXheuirA2HDcydOVrsC8kRx5XFGKdVRg/uyX2dlRHcOWFhxrS6yc6IxtxYWlRTD2SmEc=
Original file line number Diff line number Diff line change 284284 "isStruct" : true ,
285285 "cType" : " git_cred" ,
286286 "functions" : {
287+ "git_cred_default_new" : {
288+ "ignore" : false ,
289+ "isPrototypeMethod" : false ,
290+ "args" : [{ "isSelf" : false }],
291+ "isAsync" : false
292+ },
293+ "git_cred_has_username" : {
294+ "ignore" : false ,
295+ "args" : [{ "isSelf" : true }]
296+ },
287297 "git_cred_ssh_key_from_agent" : {
288298 "ignore" : false ,
289299 "isPrototypeMethod" : false ,
290300 "args" : [{ "isSelf" : false }],
291301 "isAsync" : false
302+ },
303+ "git_cred_ssh_key_new" : {
304+ "ignore" : false ,
305+ "isPrototypeMethod" : false ,
306+ "args" : [{ "isSelf" : false }],
307+ "isAsync" : false
308+ },
309+ "git_cred_userpass_plaintext_new" : {
310+ "ignore" : false ,
311+ "isPrototypeMethod" : false ,
312+ "args" : [{ "isSelf" : false }],
313+ "isAsync" : false
292314 }
293315 }
294316 },
Original file line number Diff line number Diff line change 1+ var assert = require ( "assert" ) ;
2+
3+ describe ( "Cred" , function ( ) {
4+ var NodeGit = require ( "../../" ) ;
5+
6+ it ( "can create default credentials" , function ( ) {
7+ var defaultCreds = NodeGit . Cred . defaultNew ( ) ;
8+
9+ assert ( defaultCreds instanceof NodeGit . Cred ) ;
10+ } ) ;
11+
12+ it ( "can create ssh credentials using passed keys" , function ( ) {
13+ var sshCreds
14+ = NodeGit . Cred . sshKeyNew (
15+ "username" ,
16+ "public key" ,
17+ "private key" ,
18+ "passphrase" ) ;
19+
20+ assert ( sshCreds instanceof NodeGit . Cred ) ;
21+ } ) ;
22+
23+ it ( "can create credentials using plaintext" , function ( ) {
24+ var plaintextCreds
25+ = NodeGit . Cred . userpassPlaintextNew ( "username" , "password" ) ;
26+
27+ assert ( plaintextCreds instanceof NodeGit . Cred ) ;
28+ } ) ;
29+ } ) ;
You can’t perform that action at this time.
0 commit comments