Skip to content

Commit

Permalink
small adjustments due to linting issues mainly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosommi committed Feb 26, 2016
1 parent 5398cdb commit 70ada5c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
Expand Up @@ -5,7 +5,6 @@ import jsonApiModelFormatter from "jsonapi-model-formatter";
chai.should();

import <%= modelNamePascal %> from "../../../dist/lib/models/<%= modelName %>.js";
import AccessToken from "../../../dist/lib/models/accessToken.js";
import <%= modelNamePluralPascal %>List from "../../../dist/lib/lambdas/<%= modelNamePlural %>/<%= modelNamePlural %>List.js";
import authenticate from "../../../dist/lib/steps/authenticate.js";
import authorize from "../../../dist/lib/steps/authorize.js";
Expand Down Expand Up @@ -94,7 +93,6 @@ describe("lambdas/<%= modelName %>List.js", () => {

describe("(when the steps are executed correctly)", () => {
let result;
let accessToken;
let expectedResponse;

beforeEach(() => {
Expand All @@ -107,7 +105,7 @@ describe("lambdas/<%= modelName %>List.js", () => {

expectedResponse = {
data: jsonApiModelFormatter(result)
}
};
});

it("should return the results as expected", done => {
Expand Down
Expand Up @@ -5,7 +5,6 @@ import jsonApiModelFormatter from "jsonapi-model-formatter";
chai.should();

import <%= modelNamePascal %> from "../../../dist/lib/models/<%= modelName %>.js";
import AccessToken from "../../../dist/lib/models/accessToken.js";
import <%= modelNamePluralPascal %>Show from "../../../dist/lib/lambdas/<%= modelNamePlural %>/<%= modelNamePlural %>Show.js";
import authenticate from "../../../dist/lib/steps/authenticate.js";
import authorize from "../../../dist/lib/steps/authorize.js";
Expand Down Expand Up @@ -101,7 +100,6 @@ describe("lambdas/<%= modelName %>.show.js", () => {

describe("(when the steps are executed correctly)", () => {
let result;
let accessToken;
let expectedResponse;

beforeEach(() => {
Expand All @@ -114,7 +112,7 @@ describe("lambdas/<%= modelName %>.show.js", () => {

expectedResponse = {
data: jsonApiModelFormatter(result)
}
};
});

it("should return the results as expected", done => {
Expand Down
Expand Up @@ -28,13 +28,10 @@ describe("steps/delete<%= modelNamePluralPascal %>.js", () => {

describe("(when is valid)", () => {

let mockQueryInsert;
let mockQueryApiKeyInsert;
let mockQueryRoleSelect;
let mockQueryApiKeyRoleInsert;
let mockQueryUpdate;

beforeEach(() => {
mockQueryInsert = database.mock
mockQueryUpdate = database.mock
.update({
"name": "guest",
"updated_at": regexs.date,
Expand All @@ -61,7 +58,7 @@ describe("steps/delete<%= modelNamePluralPascal %>.js", () => {

it("should execute the <%= modelName %> query", done => {
delete<%= modelNamePluralPascal %>(actionContext, () => {
mockQueryInsert.called.should.be.true;
mockQueryUpdate.called.should.be.true;
done();
});
});
Expand Down
Expand Up @@ -77,7 +77,7 @@ describe("steps/fetch<%= modelNamePluralPascal %>.js", () => {
});

it("should call the query", done => {
fetch<%= modelNamePluralPascal %>(actionContext, (error) => {
fetch<%= modelNamePluralPascal %>(actionContext, () => {
mockQuery.called.should.be.true;
done();
});
Expand Down
2 changes: 1 addition & 1 deletion generators/model/templates/source/lib/models/model.js
@@ -1,4 +1,4 @@
import Model, {isNotEmpty} from "dovima";
import Model, { isNotEmpty } from "dovima";

export default class <%= modelNamePascal %> extends Model {
static useSoftDelete() {}
Expand Down

0 comments on commit 70ada5c

Please sign in to comment.