diff --git a/tests/init.rb b/tests/init.rb index 17e27979..1ae95b85 100644 --- a/tests/init.rb +++ b/tests/init.rb @@ -30,5 +30,6 @@ require './staff/assign-ticket.rb' require './staff/un-assign-ticket.rb' require './staff/get-tickets.rb' require './ticket/change-priority.rb' +require './staff/get-new-tickets.rb' diff --git a/tests/staff/get-new-tickets.rb b/tests/staff/get-new-tickets.rb new file mode 100644 index 00000000..2ecf7d1d --- /dev/null +++ b/tests/staff/get-new-tickets.rb @@ -0,0 +1,15 @@ +describe '/staff/get-new-tickets' do + request('/user/logout') + Scripts.login($staff[:email], $staff[:password], true) + + it 'should get news tickets' do + + result = request('/staff/get-new-tickets', { + csrf_userid: $csrf_userid, + csrf_token: $csrf_token + }) + + (result['status']).should.equal('success') + (result['data'].size).should.equal(7) + end +end \ No newline at end of file