|
@@ -538,6 +538,14 @@ describe("API", function () {
|
|
);
|
|
);
|
|
return expect(response).to.have.status(422);
|
|
return expect(response).to.have.status(422);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ it("gives the right response for records contents being null", function () {
|
|
|
|
+ var response = chakram.post(
|
|
|
|
+ '/domains/' + domain + '/rrsets/',
|
|
|
|
+ [{'subname': 'a.2', 'ttl': 50, 'type': 'MX', 'records': ['1.2.3.4', null]}]
|
|
|
|
+ );
|
|
|
|
+ return expect(response).to.have.status(400);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
});
|
|
});
|
|
@@ -759,6 +767,14 @@ describe("API", function () {
|
|
);
|
|
);
|
|
return expect(response).to.have.status(422);
|
|
return expect(response).to.have.status(422);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ it("gives the right response for records contents being null", function () {
|
|
|
|
+ var response = chakram.put(
|
|
|
|
+ '/domains/' + domain + '/rrsets/',
|
|
|
|
+ [{'subname': 'a.2', 'ttl': 50, 'type': 'MX', 'records': ['1.2.3.4', null]}]
|
|
|
|
+ );
|
|
|
|
+ return expect(response).to.have.status(400);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
});
|
|
});
|
|
@@ -1032,6 +1048,14 @@ describe("API", function () {
|
|
);
|
|
);
|
|
return expect(response).to.have.status(422);
|
|
return expect(response).to.have.status(422);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ it("gives the right response for records contents being null", function () {
|
|
|
|
+ var response = chakram.patch(
|
|
|
|
+ '/domains/' + domain + '/rrsets/',
|
|
|
|
+ [{'subname': 'a.2', 'ttl': 50, 'type': 'MX', 'records': ['1.2.3.4', null]}]
|
|
|
|
+ );
|
|
|
|
+ return expect(response).to.have.status(400);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
});
|
|
});
|