gitter/vows/branch.js
2012-06-12 22:12:20 -07:00

23 lines
652 B
JavaScript

var gh = require('../')
, vows = require('vows')
, assert = require('assert')
, h = require('./helper')
, User = 'samsonjs'
, Repo = 'gitter'
, Branch = 'master'
vows.describe('Branch').addBatch({
'after fetching a branch': {
topic: function() { gh.branch(User, Repo, Branch, this.callback) },
'attributes can be accessed': function(err, branch) {
assert.ifError(err)
assert.typeOf(branch.ref, 'string')
assert.instanceOf(branch.object, Object)
},
'expected fields are present': function(err, branch) {
assert.ifError(err)
assert.ok(h.looksLikeABranch(branch))
},
}
}).export(module)