@@ -333,18 +333,21 @@ describe('Repository', function () {
333
333
} )
334
334
} )
335
335
336
- xdescribe ( 'pull()' , ( ) => {
337
- it ( 'brings commits from the remote' , async ( ) => {
338
- const { localRepoPath, remoteRepoPath } = await createLocalAndRemoteRepositories ( )
336
+ describe ( 'pull()' , ( ) => {
337
+ it ( 'updates the remote branch and merges into local branch ' , async ( ) => {
338
+ const { localRepoPath} = await createLocalAndRemoteRepositories ( )
339
339
const localRepo = await buildRepository ( localRepoPath )
340
- const remoteRepo = await Git . Repository . open ( remoteRepoPath )
341
-
342
- await createEmptyCommit ( remoteRepoPath , 'new remote commit ')
343
-
344
- assert . notEqual ( ( await remoteRepo . getMasterCommit ( ) ) . message ( ) , ( await localRepo . getLastCommit ( ) ) . message )
340
+ let remoteHead , localHead
341
+ remoteHead = await localRepo . git . getCommit ( 'origin/master' )
342
+ localHead = await localRepo . git . getCommit ( 'master ')
343
+ assert . equal ( remoteHead . message , 'second commit' )
344
+ assert . equal ( localHead . message , 'second commit' )
345
345
346
346
await localRepo . pull ( 'master' )
347
- assert . equal ( ( await remoteRepo . getMasterCommit ( ) ) . message ( ) , ( await localRepo . getLastCommit ( ) ) . message )
347
+ remoteHead = await localRepo . git . getCommit ( 'origin/master' )
348
+ localHead = await localRepo . git . getCommit ( 'master' )
349
+ assert . equal ( remoteHead . message , 'third commit' )
350
+ assert . equal ( localHead . message , 'third commit' )
348
351
} )
349
352
} )
350
353
0 commit comments