From 6dff601739f87f5c2f3fd23c18d2c9aa9a5ece7b Mon Sep 17 00:00:00 2001 From: Bjarte Stien Karlsen Date: Mon, 5 Aug 2024 23:16:17 +0200 Subject: [PATCH] added tests to verify we can list two names with provider memoize --- lease_market_sale_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lease_market_sale_test.go b/lease_market_sale_test.go index f7322d64..a19acbdf 100644 --- a/lease_market_sale_test.go +++ b/lease_market_sale_test.go @@ -196,4 +196,23 @@ func TestLeaseMarketSale(t *testing.T) { ). AssertFailure(t, "Seller banned by Tenant") }) + + + ot.Run(t, "Should be able to list two leases for sale", func(t *testing.T) { + + otu.O.Tx("devRegisterDapper", + WithSigner("user5"), + WithPayloadSigner("dapper"), + WithArg("merchAccount", "dapper"), + WithArg("name", "name5"), + WithArg("amount", 5.0), + ).AssertSuccess(otu.T) + + otu.listLeaseForSaleDUC("user5", "user5", price) + otu.listLeaseForSaleDUC("user5", "name5", price) + + itemsForSale := otu.getLeasesForSale("user5") + require.Equal(t, 2 , len(itemsForSale)) + + }) }