From 61a67e145f3ff2fea0ccea02008d8eaa5edf0dba Mon Sep 17 00:00:00 2001 From: Rafael <rpd17@inf.ufpr.br> Date: Thu, 5 Jul 2018 11:15:45 -0300 Subject: [PATCH] Issue #81: Fix spelling errors in test and error messages. Signed-off-by: Rafael <rpd17@inf.ufpr.br> --- src/api/controllers/collect.spec.ts | 16 ++++++++-------- src/api/controllers/collect.ts | 2 +- src/api/controllers/data.spec.ts | 6 +++--- src/api/controllers/data.ts | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/api/controllers/collect.spec.ts b/src/api/controllers/collect.spec.ts index dedb013a..24ac015a 100644 --- a/src/api/controllers/collect.spec.ts +++ b/src/api/controllers/collect.spec.ts @@ -76,7 +76,7 @@ describe("API collect controller", () => { .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The source named 'thisisjustatest' was not found"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -93,7 +93,7 @@ describe("API collect controller", () => { .expect(500) .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The 'fields:0' wasn't informed on json"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -124,7 +124,7 @@ describe("API collect controller", () => { .expect(500) .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The value '1' from 'fields:0' isn't listed on enumtype:0"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -157,7 +157,7 @@ describe("API collect controller", () => { .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The value 'nope' from 'fields:0' isn't a type integer"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -176,7 +176,7 @@ describe("API collect controller", () => { .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The value 'notafloat' from 'fields:1' isn't a type float"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -195,7 +195,7 @@ describe("API collect controller", () => { .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The value '1' from 'fields:2' isn't a type string"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -214,7 +214,7 @@ describe("API collect controller", () => { .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The value 'notaboolean' from 'fields:3' isn't a type boolean"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -233,7 +233,7 @@ describe("API collect controller", () => { .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the parameters given."; + "Could not construct query with the given parameters."; const error = "The value '1999-25-25' from 'fields:4' isn't a type date"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); diff --git a/src/api/controllers/collect.ts b/src/api/controllers/collect.ts index e36ca6f2..d2dad150 100644 --- a/src/api/controllers/collect.ts +++ b/src/api/controllers/collect.ts @@ -162,7 +162,7 @@ export class CollectCtrl { catch (e) { res.status(500).json({ message: "Query execution failed: " + - "Could not construct query with the parameters given.", + "Could not construct query with the given parameters.", error: e.message }); return; diff --git a/src/api/controllers/data.spec.ts b/src/api/controllers/data.spec.ts index 4719012e..e11ac61d 100644 --- a/src/api/controllers/data.spec.ts +++ b/src/api/controllers/data.spec.ts @@ -52,7 +52,7 @@ describe("API data controller", () => { .expect(500) .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the paramters given."; + "Could not construct query with the given parameters."; const error = "The metric named met:-1 was not found"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -70,7 +70,7 @@ describe("API data controller", () => { .expect(500) .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the paramters given."; + "Could not construct query with the given parameters."; const error = "The dimension named dim:-1 was not found"; expect(res.body).to.be.an("object"); expect(res.body).to.have.property("message"); @@ -90,7 +90,7 @@ describe("API data controller", () => { .expect(500) .expect((res: any) => { const message = "Query execution failed: " + - "Could not construct query with the paramters given."; + "Could not construct query with the given parameters."; const error = "The item 'dim:0'" + " is not present in neither metrics nor dimensions list"; expect(res.body).to.be.an("object"); diff --git a/src/api/controllers/data.ts b/src/api/controllers/data.ts index a9cf36c8..306cacab 100644 --- a/src/api/controllers/data.ts +++ b/src/api/controllers/data.ts @@ -85,7 +85,7 @@ export class DataCtrl { catch (e) { res.status(500).json({ message: "Query execution failed: " + - "Could not construct query with the paramters given.", + "Could not construct query with the given parameters.", error: e.message }); return; -- GitLab