assertEquals(true, pushStatus.isOK());
// TODO: replace with RESTful API for git pull when available
// try to pull - up to date status is expected
Git git = new Git(getRepositoryForContentLocation(cloneContentLocation));
PullResult pullResults = git.pull().call();
assertEquals(Constants.DEFAULT_REMOTE_NAME, pullResults.getFetchedFrom());
assertEquals(MergeStatus.ALREADY_UP_TO_DATE, pullResults.getMergeResult().getMergeStatus());
assertNull(pullResults.getRebaseResult());
// checkout branch which was created a moment ago
response = checkoutBranch(cloneLocation, BRANCH_NAME);
assertEquals(HttpURLConnection.HTTP_OK, response.getResponseCode());
// TODO: replace with RESTful API for git pull when available
// try to pull again - now fast forward update is expected
pullResults = git.pull().call();
assertEquals(Constants.DEFAULT_REMOTE_NAME, pullResults.getFetchedFrom());
assertEquals(MergeStatus.FAST_FORWARD, pullResults.getMergeResult().getMergeStatus());
assertNull(pullResults.getRebaseResult());
}
}