implemented .createRecord

This commit is contained in:
2016-05-24 23:36:06 +02:00
parent f4d4bc238b
commit 0ed9c7f4f4
16 changed files with 102 additions and 36 deletions

1
test/test.d.ts vendored
View File

@ -0,0 +1 @@
import "typings-test";

File diff suppressed because one or more lines are too long

View File

@ -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();
})
});
});
})
});