Update ruby tests

This commit is contained in:
Ivan Diaz 2018-07-19 18:09:54 -03:00
parent cd2e1cd3df
commit 0b38addd58
4 changed files with 5 additions and 6 deletions

View File

@ -20,7 +20,7 @@ describe'/staff/get-all' do
(result['data'][0]['departments'][1]['name']).should.equal('Suggestions')
(result['data'][0]['departments'][2]['id']).should.equal('3')
(result['data'][0]['departments'][2]['name']).should.equal('Tech support')
(result['data'][0]['assignedTickets']).should.equal(3)
(result['data'][0]['assignedTickets']).should.equal(4)
(result['data'][0]['closedTickets']).should.equal(0)
(result['data'][2]['name']).should.equal('Arya Stark')

View File

@ -22,6 +22,6 @@ describe '/staff/get-tickets' do
})
(result['status']).should.equal('success')
(result['data'].size).should.equal(2)
(result['data'].size).should.equal(3)
end
end
end

View File

@ -23,7 +23,7 @@ describe '/staff/un-assign-ticket' do
(ticket['owner_id']).should.equal(nil)
(ticket['unread']).should.equal('1')
staff_ticket = $database.getRow('staff_ticket', 1 , 'id')
staff_ticket = $database.getRow('staff_ticket', 1 , 'ticket_id')
(staff_ticket).should.equal(nil)
end
@ -75,7 +75,7 @@ describe '/staff/un-assign-ticket' do
(ticket['owner_id']).should.equal(nil)
(ticket['unread']).should.equal('1')
staff_ticket = $database.getRow('staff_ticket', 1 , 'id')
staff_ticket = $database.getRow('staff_ticket', 1 , 'ticket_id')
(staff_ticket).should.equal(nil)
end

View File

@ -34,7 +34,6 @@ describe '/ticket/close' do
csrf_token: $csrf_token
})
puts result
(result['status']).should.equal('success')
ticket = $database.getRow('ticket', 1 , 'id')