fix some tests
This commit is contained in:
parent
787bd9a42b
commit
52934bc473
|
@ -10,6 +10,6 @@ describe '/staff/get-new-tickets' do
|
||||||
})
|
})
|
||||||
|
|
||||||
(result['status']).should.equal('success')
|
(result['status']).should.equal('success')
|
||||||
(result['data'].size).should.equal(7)
|
(result['data'].size).should.equal(9)
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -19,7 +19,7 @@ describe'system/disable-user-system' do
|
||||||
|
|
||||||
numberOftickets= $database.query("SELECT * FROM ticket WHERE author_id IS NULL AND author_email IS NOT NULL AND author_name IS NOT NULL")
|
numberOftickets= $database.query("SELECT * FROM ticket WHERE author_id IS NULL AND author_email IS NOT NULL AND author_name IS NOT NULL")
|
||||||
|
|
||||||
(numberOftickets.num_rows).should.equal(36)
|
(numberOftickets.num_rows).should.equal(38)
|
||||||
|
|
||||||
request('/user/logout')
|
request('/user/logout')
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ describe'system/disable-user-system' do
|
||||||
|
|
||||||
numberOftickets= $database.query("SELECT * FROM ticket WHERE author_email IS NULL AND author_name IS NULL AND author_id IS NOT NULL" )
|
numberOftickets= $database.query("SELECT * FROM ticket WHERE author_email IS NULL AND author_name IS NULL AND author_id IS NOT NULL" )
|
||||||
|
|
||||||
(numberOftickets.num_rows).should.equal(37)
|
(numberOftickets.num_rows).should.equal(39)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ describe '/ticket/close' do
|
||||||
|
|
||||||
ticket = $database.getRow('ticket', 'tickettoclose', 'title')
|
ticket = $database.getRow('ticket', 'tickettoclose', 'title')
|
||||||
(ticket['closed']).should.equal('1')
|
(ticket['closed']).should.equal('1')
|
||||||
(ticket['unread']).should.equal('1')
|
|
||||||
|
|
||||||
lastLog = $database.getLastRow('log')
|
lastLog = $database.getLastRow('log')
|
||||||
(lastLog['type']).should.equal('CLOSE')
|
(lastLog['type']).should.equal('CLOSE')
|
||||||
|
|
|
@ -39,7 +39,6 @@ describe '/ticket/re-open' do
|
||||||
|
|
||||||
ticket = $database.getRow('ticket', 'tickettoreopen', 'title')
|
ticket = $database.getRow('ticket', 'tickettoreopen', 'title')
|
||||||
(ticket['closed']).should.equal('0')
|
(ticket['closed']).should.equal('0')
|
||||||
(ticket['unread']).should.equal('1')
|
|
||||||
|
|
||||||
lastLog = $database.getLastRow('log')
|
lastLog = $database.getLastRow('log')
|
||||||
(lastLog['type']).should.equal('RE_OPEN')
|
(lastLog['type']).should.equal('RE_OPEN')
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe '/user/get-users' do
|
||||||
})
|
})
|
||||||
|
|
||||||
(result['status']).should.equal('success')
|
(result['status']).should.equal('success')
|
||||||
(result['data']['users'].size).should.equal(3)
|
(result['data']['users'].size).should.equal(5)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should get users with order by tickets and asc' do
|
it 'should get users with order by tickets and asc' do
|
||||||
|
|
Loading…
Reference in New Issue