describe("defaults", function() { var request = testApp.request(mockRequest); beforeEach(function() { request = testApp.request(mockRequest); }) it("responds with expected version attribute", function() { return expect(request).to.eventually.have.property("version", "1.0"); }); describe("alexa response", function() { it("responds with expected alexa response defaults", function() { var subject = request.then(function(response) { return response.response; }); return expect(subject).to.eventually.have.property("shouldEndSession", true); }); }); });
return response.response; }); return expect(cardResponse).to.eventually.not.have.property("card"); }); });
it("should properly handle boolean parameters", function() { var query = conn.query("CREATE TABLE bar (a BOOLEAN, b BOOLEAN)").then(function() { return conn.query("INSERT INTO bar VALUES (?, ?)", [true, false]); }).then(function() { return conn.query("SELECT * FROM bar"); }); return shouldHaveValidResult(query, 1, 2, ["a", "b"]) .should.eventually.have.property("data") .that.deep.equals([[true, false]]); });
describe(".getEvolutionChainsList() secure (with ssl)", function() { before(function() { promise = P.getEvolutionChainsList(); }); it("should succeed", function() { return promise; }); it("should have property count", function() { return expect(promise).to.eventually.have.property("count"); }); });
describe(".getItemFlingEffectsList() secure (with ssl)", function() { before(function() { promise = P.getItemFlingEffectsList(); }); it("should succeed", function() { return promise; }); it("should have property count", function() { return expect(promise).to.eventually.have.property("count"); }); });
describe(".getItemPocketsList() secure (with ssl)", function() { before(function() { promise = P.getItemPocketsList(); }); it("should succeed", function() { return promise; }); it("should have property count", function() { return expect(promise).to.eventually.have.property("count"); }); });
describe(".getMovesList() secure (with ssl)", function() { before(function() { promise = P.getMovesList(); }); it("should succeed", function() { return promise; }); it("should have property count", function() { return expect(promise).to.eventually.have.property("count"); }); });
describe(".getLocationAreasList() secure (with ssl)", function() { before(function() { promise = P.getLocationAreasList(); }); it("should succeed", function() { return promise; }); it("should have property count", function() { return expect(promise).to.eventually.have.property("count"); }); });
describe(".getPokemonsList() secure (with ssl)", function() { before(function() { promise = P.getPokemonsList(); }); it("should succeed", function() { return promise; }); it("should have property count", function() { return expect(promise).to.eventually.have.property("count"); }); });
describe(".getEvolutionChainById(Id: int)", function() { before(function() { promise = P.getEvolutionChainById(id); }); it("should succeed", function() { return promise; }); it("should have property name", function() { return expect(promise).to.eventually.have.property("id"); }); });
describe(".getEvolutionTriggerByName(Id: int)", function() { before(function() { promise = P.getEvolutionTriggerByName(id); }); it("should succeed", function() { return promise; }); it("should have property name", function() { return expect(promise).to.eventually.have.property("name"); }); });
describe(".getItemPocketByName(Id: int)", function() { before(function() { promise = P.getItemPocketByName(id); }); it("should succeed", function() { return promise; }); it("should have property name", function() { return expect(promise).to.eventually.have.property("name"); }); });
describe(".getPokemonColorByName(Id: int)", function() { before(function() { promise = P.getPokemonColorByName(id); }); it("should succeed", function() { return promise; }); it("should have property name", function() { return expect(promise).to.eventually.have.property("name"); }); });
it("should properly handle null parameters", function() { var query = conn.query("CREATE TABLE bar (a INT)").then(function() { return conn.query("INSERT INTO bar VALUES (?)", [null]); }).then(function() { return conn.query("SELECT * FROM bar"); }); return shouldHaveValidResult(query, 1, 1, ["a"]) .should.eventually.have.property("data") .that.deep.equals([[null]]); });