mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-03 09:13:26 +00:00
Removes case for preserving existing records
This commit is contained in:
1 parent
c2bba48a3a
commit
acb6c96901
2 files changed
+2
-41
No files matched your search
@@ -115,33 +115,6 @@ describe('Domain service', () => {
|
||||
{ HostName: 'b', RecordType: 'CNAME', Address: 'farboo' },
|
||||
]);
|
||||
});
|
||||
|
||||
xit('should maintain existing entries on the server', async () => {
|
||||
const records = [
|
||||
{ HostId: 1, Name: 'a', Type: 'CNAME', Address: 'boo' },
|
||||
{ HostId: 2, Name: 'b', Type: 'CNAME', Address: 'goo' },
|
||||
{ HostId: 3, Name: 'c', Type: 'A', Address: '12.131321.213' },
|
||||
];
|
||||
|
||||
const onGet = () => Promise.resolve({ hosts: records });
|
||||
const onSet = jest.fn(async () => ({}));
|
||||
|
||||
const mockDomainService = getDomainService({ Namecheap: getNcClass({ onSet, onGet }) });
|
||||
await mockDomainService.updateHosts([
|
||||
{ HostName: 'a', RecordType: 'CNAME', Address: 'boo' },
|
||||
{ HostName: 'b', RecordType: 'CNAME', Address: 'goo' },
|
||||
]);
|
||||
|
||||
const [hosts] = onSet.mock.calls[0];
|
||||
|
||||
expect(hosts.map(R.pick(['HostName', 'RecordType', 'Address']))).toEqual([
|
||||
{ HostName: 'a', RecordType: 'CNAME', Address: 'boo' },
|
||||
{ HostName: 'b', RecordType: 'CNAME', Address: 'goo' },
|
||||
{ HostName: 'c', RecordType: 'A', Address: '12.131321.213' },
|
||||
]);
|
||||
expect();
|
||||
// expect(onSet).toBeCalledTimes(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user