Skip to content

Commit

Permalink
test(notifications): with recepient with and without fiat #1381
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Sep 22, 2022
1 parent 404a4fc commit a5b56ed
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe("Payment notifications", () => {
});
});

test("success via lnaddress from popup without fiat-conversion turned on", async () => {
test("success via lnaddress from popup without fiat-conversion turned off", async () => {
const mockStateNoFiat = {
settings: { ...settings, showFiat: false },
};
Expand All @@ -148,6 +148,22 @@ describe("Payment notifications", () => {
});
});

test("success via lnaddress from popup without fiat-conversion turned on", async () => {
const mockStateNoFiat = {
settings: { ...settings },
};

state.getState = jest.fn().mockReturnValue(mockStateNoFiat);

const notifySpy = jest.spyOn(utils, "notify");
await paymentSuccessNotification("ln.sendPayment.success", data);

expect(notifySpy).toHaveBeenCalledWith({
title: "✅ Successfully paid 1 sat ($0.00) to »escapedcat@getalby.com«",
message: "Fee: 0 sats",
});
});

test("success without origin skips receiver", async () => {
state.getState = jest.fn().mockReturnValue(mockState);
const notifySpy = jest.spyOn(utils, "notify");
Expand Down

0 comments on commit a5b56ed

Please sign in to comment.