Refactor how we get storeids list in invoice filter (#3483)

This commit is contained in:
Nicolas Dorier
2022-02-21 14:53:48 +09:00
committed by GitHub
parent 7b81b9786d
commit 19eea3a615
2 changed files with 15 additions and 9 deletions

View File

@@ -925,7 +925,7 @@ namespace BTCPayServer.Tests
private void AssertSearchInvoice(TestAccount acc, bool expected, string invoiceId, string filter, string storeId = null)
{
var result =
(InvoicesModel)((ViewResult)acc.GetController<UIInvoiceController>()
(InvoicesModel)((ViewResult)acc.GetController<UIInvoiceController>(storeId is not null)
.ListInvoices(new InvoicesModel { SearchTerm = filter, StoreId = storeId }).Result).Model;
Assert.Equal(expected, result.Invoices.Any(i => i.InvoiceId == invoiceId));
}