Skip to content

Commit

Permalink
test: fix broken ynab.service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grantwforsythe committed Apr 15, 2024
1 parent 323e220 commit 774e40f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/shared/services/ynab/ynab.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Transaction } from './interfaces/transactions/transaction';
import { YnabError } from './interfaces/ynabError';
import { YnabService } from './ynab.service';

// TODO: Refactor out
const id = '3fa85f64-5717-4562-b3fc-2c963f66afa6';

describe('YnabService', () => {
Expand Down Expand Up @@ -98,8 +99,8 @@ describe('YnabService', () => {
},
};

service.getBudgetById(id).subscribe((budget) => {
expect(budget.id).toEqual(id);
service.getBudgetById(mockId).subscribe((budget) => {
expect(budget.id).toEqual(mockId);
});

const req = controller.expectOne(
Expand Down Expand Up @@ -212,14 +213,14 @@ describe('YnabService', () => {
},
};

service.getPayees(id).subscribe((payees) => {
expect(payees).toHaveSize(1);
service.getPayees(mockId).subscribe((payees) => {
expect(payees).toBeDefined();
});

const req = controller.expectOne(
{
method: 'GET',
url: `https://api.ynab.com/v1/budgets/${id}/payees`,
url: `https://api.ynab.com/v1/budgets/${mockId}/payees`,
},
'Fetch all payees for a budget',
);
Expand Down

0 comments on commit 774e40f

Please sign in to comment.