mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-08-07 04:24:16 +00:00
chore: test fix
This commit is contained in:
@@ -12,7 +12,7 @@ describe('Cpanel client', () => {
|
||||
describe('fetchzonerecords', () => {
|
||||
it('should make the correct request', async () => {
|
||||
const fetch = mockFetch((url, request) => {
|
||||
expect(url).toBe('https://example.com:2000/json-api/cpanel?customonly=1&domain=a.b&cpanel_jsonapi_user=boy&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&cpanel_jsonapi_apiversion=2');
|
||||
expect(url).toBe('https://example.com:2000/json-api/cpanel?customonly=0&domain=a.b&cpanel_jsonapi_user=boy&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&cpanel_jsonapi_apiversion=2');
|
||||
expect(request).toEqual({
|
||||
headers: {
|
||||
Authorization: 'cpanel boy:boybyebye',
|
||||
@@ -35,7 +35,7 @@ describe('Cpanel client', () => {
|
||||
|
||||
it('should make the correct request with query', async () => {
|
||||
const fetch = mockFetch((url, request) => {
|
||||
expect(url).toBe('https://example.com:2000/json-api/cpanel?customonly=1&domain=foobar.boeey&cpanel_jsonapi_user=boy&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&cpanel_jsonapi_apiversion=2');
|
||||
expect(url).toBe('https://example.com:2000/json-api/cpanel?customonly=0&domain=foobar.boeey&cpanel_jsonapi_user=boy&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&cpanel_jsonapi_apiversion=2');
|
||||
expect(request).toEqual({
|
||||
headers: {
|
||||
Authorization: 'cpanel boy:boybyebye',
|
||||
|
||||
Reference in New Issue
Block a user