Skip to content

Commit

Permalink
fix(bank-user): changed names of some API functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-NC committed Jul 9, 2020
1 parent 21ef5c8 commit 9ed6a3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/core/BanksUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class BanksUser {
*
* @returns Array of BanksUserAccount
*/
public static async getAccountsByID(id: string, requestBuilder: RequestBuilder): Promise<BanksUserAccount[]> {
public static async getAccounts(id: string, requestBuilder: RequestBuilder): Promise<BanksUserAccount[]> {
const accounts: BanksUserAccount[] = await requestBuilder.request({
url: `/v1/banks-users/${id}/accounts`,
method: 'GET',
Expand All @@ -112,7 +112,7 @@ export class BanksUser {
*
* @returns Array of BanksUserTransaction
*/
public static async getTransactionsByIds(
public static async getTransactionsPerAccounts(
bankUserId: string,
accountId: string,
requestBuilder: RequestBuilder,
Expand Down
8 changes: 4 additions & 4 deletions test/bank-user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('Tests related to the BanksUser class', () => {
});
});

describe('static getAccountsByID()', () => {
describe('static getAccounts()', () => {
beforeEach(() => {
banksUserAPI = getFakeAlgoanServer({
baseUrl,
Expand All @@ -62,13 +62,13 @@ describe('Tests related to the BanksUser class', () => {
});
});
it('should get the Banks User account', async () => {
const accounts: BanksUserAccount[] = await BanksUser.getAccountsByID('id1', requestBuilder);
const accounts: BanksUserAccount[] = await BanksUser.getAccounts('id1', requestBuilder);
expect(banksUserAPI.isDone()).toBeTruthy();
expect(accounts).toMatchObject([banksUserAccountSample]);
});
});

describe('static getTransactionsByIds()', () => {
describe('static getTransactionsPerAccounts()', () => {
beforeEach(() => {
banksUserAPI = getFakeAlgoanServer({
baseUrl,
Expand All @@ -78,7 +78,7 @@ describe('Tests related to the BanksUser class', () => {
});
});
it('should get the Banks User account', async () => {
const transactions: BanksUserTransaction[] = await BanksUser.getTransactionsByIds(
const transactions: BanksUserTransaction[] = await BanksUser.getTransactionsPerAccounts(
'id1',
'accountId1',
requestBuilder,
Expand Down

0 comments on commit 9ed6a3c

Please sign in to comment.