@@ -16,18 +16,18 @@ describe("Submodule", function() {
1616 return RepoUtils . createRepository ( repoPath )
1717 . then ( function ( repo ) {
1818 test . repository = repo ;
19+ return Repository . open ( local ( "../repos/workdir" ) ) ;
20+ } )
21+ . then ( function ( repo ) {
22+ test . workdirRepository = repo ;
1923 } ) ;
2024 } ) ;
2125
2226 it ( "can walk over the submodules" , function ( ) {
23- var repo ;
27+ var repo = this . workdirRepository ;
2428 var submoduleName = "vendor/libgit2" ;
2529
26- return Repository . open ( local ( "../repos/workdir" ) )
27- . then ( function ( _repo ) {
28- repo = _repo ;
29- return repo . getSubmoduleNames ( ) ;
30- } )
30+ return repo . getSubmoduleNames ( )
3131 . then ( function ( submodules ) {
3232 assert . equal ( submodules . length , 1 ) ;
3333
@@ -43,6 +43,16 @@ describe("Submodule", function() {
4343 } ) ;
4444 } ) ;
4545
46+ it ( "can get submodule status" , function ( ) {
47+ var repo = this . workdirRepository ;
48+ var submoduleName = "vendor/libgit2" ;
49+
50+ return Submodule . status ( repo , submoduleName , Submodule . IGNORE . NONE )
51+ . then ( function ( status ) {
52+ assert . equal ( Submodule . STATUS . IN_CONFIG , status ) ;
53+ } ) ;
54+ } ) ;
55+
4656 it ( "can setup and finalize submodule add" , function ( ) {
4757 var repo = this . repository ;
4858 var submodulePath = "hellogitworld" ;
0 commit comments