implemented .createRecord
This commit is contained in:
1
test/test.d.ts
vendored
1
test/test.d.ts
vendored
@ -0,0 +1 @@
|
||||
import "typings-test";
|
||||
|
18
test/test.js
18
test/test.js
File diff suppressed because one or more lines are too long
25
test/test.ts
25
test/test.ts
@ -1,4 +1,4 @@
|
||||
/// <reference path="../ts/typings/main.d.ts" />
|
||||
import "typings-test";
|
||||
import cflare = require("../dist/index");
|
||||
let should = require("should");
|
||||
let nogit = require("../nogit/nogit.json");
|
||||
@ -23,7 +23,7 @@ describe("cflare",function(){
|
||||
});
|
||||
describe(".getZoneId(domainName)",function(){
|
||||
it("should get an Cloudflare Id for a domain string",function(done){
|
||||
this.timeout(5000)
|
||||
this.timeout(10000)
|
||||
testCflareAccount.getZoneId("push.rocks")
|
||||
.then((responseArg)=>{
|
||||
console.log(responseArg);
|
||||
@ -33,7 +33,7 @@ describe("cflare",function(){
|
||||
});
|
||||
describe(".listRecords(domainName)",function(){
|
||||
it("should list all records for a specific Domain Name",function(done){
|
||||
this.timeout(5000);
|
||||
this.timeout(10000);
|
||||
testCflareAccount.listRecords("push.rocks")
|
||||
.then((responseArg) => {
|
||||
console.log(responseArg);
|
||||
@ -41,5 +41,24 @@ describe("cflare",function(){
|
||||
});
|
||||
});
|
||||
})
|
||||
describe(".createRecord",function(){
|
||||
this.timeout(10000);
|
||||
it("should create a valid record for a domain",function(done){
|
||||
testCflareAccount.createRecord("bleu.de","A","127.0.0.1")
|
||||
.then(function(responseArg){
|
||||
console.log(responseArg);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe(".removeRecord",function(){
|
||||
it("should remove a record from Cloudflare",function(done){
|
||||
testCflareAccount.removeRecord()
|
||||
.then(function(responseArg){
|
||||
console.log(responseArg);
|
||||
done();
|
||||
})
|
||||
});
|
||||
});
|
||||
})
|
||||
});
|
||||
|
Reference in New Issue
Block a user