open or closed empty
This commit is contained in:
parent
689f6868a8
commit
8426ee24b6
|
@ -21,4 +21,34 @@ module.exports =
|
|||
assert.equal called, 2
|
||||
assert.equal open.length, 0
|
||||
assert.equal closed.length, 0
|
||||
done.call null
|
||||
|
||||
'open empty': (done) ->
|
||||
called = 0
|
||||
req.all_issues = (opts, cb) ->
|
||||
called += 1
|
||||
cb null, if called is 1 then [] else [
|
||||
{ number: 1 }
|
||||
]
|
||||
|
||||
issues.get_all {}, (err, [ open, closed ]) ->
|
||||
assert.ifError err
|
||||
assert.equal called, 2
|
||||
assert.equal open.length, 0
|
||||
assert.equal closed.length, 1
|
||||
done.call null
|
||||
|
||||
'closed empty': (done) ->
|
||||
called = 0
|
||||
req.all_issues = (opts, cb) ->
|
||||
called += 1
|
||||
cb null, if called is 2 then [] else [
|
||||
{ number: 1 }
|
||||
]
|
||||
|
||||
issues.get_all {}, (err, [ open, closed ]) ->
|
||||
assert.ifError err
|
||||
assert.equal called, 2
|
||||
assert.equal open.length, 1
|
||||
assert.equal closed.length, 0
|
||||
done.call null
|
Loading…
Reference in New Issue