Skip to content

Commit

Permalink
test(core-api): /node/fees endpoint (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian authored Jun 21, 2019
1 parent f34edcf commit fd2d056
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions __tests__/integration/core-api/handlers/node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,20 @@ describe("API 2.0 - Loader", () => {
});

describe("GET /node/configuration/crypto", () => {
it("should GET the node syncing status", async () => {
it("should GET the node crypto configuration", async () => {
const response = await utils.request("GET", "node/configuration/crypto");
expect(response).toBeSuccessfulResponse();
expect(response.data.data).toBeObject();
expect(response.data.data).toEqual(Managers.configManager.getPreset("testnet"));
});
});

describe.skip("GET /node/fees", () => {
it("should GET the node syncing status", async () => {
const response = await utils.request("GET", "node/fees");
describe("GET /node/fees", () => {
it("should GET the node fees", async () => {
const response = await utils.request("GET", "node/fees", { days: 14 });
expect(response).toBeSuccessfulResponse();
expect(response.data.data).toBeObject();
expect(response.data.meta.days).toBe(14);
expect(response.data.data).toBeArray();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class TransactionsRepository extends Repository implements Database.ITran
.valueOf(),
);

return this.db.many(queries.transactions.feeStatistics, { age, minFee });
return this.db.manyOrNone(queries.transactions.feeStatistics, { age, minFee });
}

public async findAllByWallet(
Expand Down

0 comments on commit fd2d056

Please sign in to comment.