mirror of
https://github.com/status-im/burnchart.git
synced 2025-01-19 07:03:27 +00:00
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…
x
Reference in New Issue
Block a user