update github test
This commit is contained in:
parent
46a7252586
commit
76696cfd92
@ -35,7 +35,7 @@ describe 'modulo github', ->
|
||||
|
||||
it 'dovrebbe rispondere correttamente in caso di 0 issues', (done) ->
|
||||
nock('https://api.github.com')
|
||||
.get('/repos/fazo96/asjon/issues?state=open&sort=updated')
|
||||
.get('/repos/rnhmjoj/asjon/issues?state=open&sort=updated')
|
||||
.reply 200, []
|
||||
acc = 0
|
||||
asjon.receive (e,l) ->
|
||||
@ -63,7 +63,7 @@ describe 'modulo github', ->
|
||||
|
||||
it 'dovrebbe rispondere correttamente in caso di 1 o più issues', (done) ->
|
||||
nock('https://api.github.com')
|
||||
.get('/repos/fazo96/asjon/issues?state=open&sort=updated')
|
||||
.get('/repos/rnhmjoj/asjon/issues?state=open&sort=updated')
|
||||
.reply 200, [issue1, issue2]
|
||||
acc = 0
|
||||
asjon.receive (e,l) ->
|
||||
@ -81,9 +81,9 @@ describe 'modulo github', ->
|
||||
acc = 0
|
||||
asjon.receive (e,l) ->
|
||||
if acc is 0
|
||||
l.join().should.equal 'http://github.com/fazo96/asjon/issues/5'
|
||||
l.join().should.equal 'http://github.com/rnhmjoj/asjon/issues/5'
|
||||
else
|
||||
l.join().should.equal 'http://github.com/fazo96/asjon/issues/456'
|
||||
l.join().should.equal 'http://github.com/rnhmjoj/asjon/issues/456'
|
||||
acc++
|
||||
if acc is 2 then done()
|
||||
asjon.send 'asjon linkami la issue numero 5'
|
||||
@ -105,9 +105,9 @@ describe 'modulo github', ->
|
||||
send: (code) -> code.should.equal 200
|
||||
asjon.receive (e,l) ->
|
||||
if acc is 0
|
||||
l.join().should.equal 'Branch '+req.body.ref+' aggiornato!\n'
|
||||
l.join().should.equal 'branch '+req.body.ref+' aggiornato!\n'
|
||||
if acc is 1
|
||||
l.join().should.equal 'Branch '+req.body.ref+' aggiornato!\ntest -> commit'
|
||||
l.join().should.equal 'branch '+req.body.ref+' aggiornato!\ntest -> commit'
|
||||
acc++
|
||||
if acc is 2 then done()
|
||||
githubhook req, res
|
||||
|
Loading…
Reference in New Issue
Block a user