File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 553553 "return" : {
554554 "copy" : " git_strarray_copy"
555555 }
556+ },
557+
558+ "git_remote_load" : {
559+ "ignore" : false ,
560+ "isConstructorMethod" : true
561+ },
562+
563+ "git_remote_url" : {
564+ "ignore" : false ,
565+ "args" : [{ "isSelf" : true }]
556566 }
557567 }
558568 },
Original file line number Diff line number Diff line change 1+ var assert = require ( "assert" ) ;
2+ var path = require ( "path" ) ;
3+
4+ describe ( "Repository" , function ( ) {
5+ var reposPath = path . resolve ( "test/repos/workdir/.git" ) ;
6+
7+ var Repository = require ( "../../lib/repository" ) ;
8+ var Remote = require ( "../../lib/remote" ) ;
9+
10+ before ( function ( ) {
11+ var test = this ;
12+
13+ return Repository . open ( reposPath ) . then ( function ( repository ) {
14+ test . repository = repository ;
15+ } ) ;
16+ } ) ;
17+
18+ it ( "can read git remote url" , function ( ) {
19+ return Remote . load ( this . repository , "origin" ) . then ( function ( remote ) {
20+ assert . ok ( remote instanceof Remote ) ;
21+ assert . equal ( remote . url ( ) , "https://github.com/nodegit/nodegit" ) ;
22+ } ) ;
23+ } ) ;
24+ } ) ;
You can’t perform that action at this time.
0 commit comments