opensupports/tests/system/get-api-keys.rb

21 lines
738 B
Ruby
Raw Permalink Normal View History

describe'system/get-api-keys' do
Scripts.logout()
2019-11-16 21:16:53 +01:00
Scripts.login($staff[:email], $staff[:password], true)
2019-11-16 21:16:53 +01:00
it 'should get all API keys' do
result = request('/system/get-api-keys', {
csrf_userid: $csrf_userid,
csrf_token: $csrf_token,
})
2019-11-16 21:16:53 +01:00
(result['status']).should.equal('success')
(result['data'][0]['name']).should.equal('APIkeyToTicketget')
(result['data'][1]['name']).should.equal('APIkey ticketnumber return')
(result['data'][2]['name']).should.equal('APIkey check tickets')
(result['data'][3]['name']).should.equal('APIkey user create')
(result['data'][4]['name']).should.equal('APIkey create tickets')
2019-11-16 21:16:53 +01:00
end
end