1
0
mirror of https://github.com/danog/gift.git synced 2024-11-26 20:04:47 +01:00

Improve tests

This commit is contained in:
Louis De Bevere 2016-03-09 12:01:59 +01:00
parent d6ed167156
commit eaf7a6f2ee

View File

@ -697,9 +697,23 @@ describe "Repo", ->
fs.remove git_dir, (err) ->
done err
describe "an existing branch", ->
beforeEach (done) ->
repo.checkout "feature/foo", {b: true}, (err) ->
return done err if err?
repo.checkout "master", (err) ->
return done err if err?
repo.branch (err, _head) ->
head = _head
done err
it "should succeed", ->
head.name.should.equal "master"
describe "and create new branch", ->
beforeEach (done) ->
repo.checkout "feature/foo", {b: true}, ->
repo.checkout "feature/foo", {b: true}, (err) ->
return done err if err?
repo.branch (err, _head) ->
head = _head
done err