From 79e8ce9226861927402abb139795760d3b7ea874 Mon Sep 17 00:00:00 2001 From: Kukks Date: Mon, 18 Jan 2021 14:24:38 +0100 Subject: [PATCH] Improve test on Greenfield Inoice metadata update --- BTCPayServer.Tests/GreenfieldAPITests.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BTCPayServer.Tests/GreenfieldAPITests.cs b/BTCPayServer.Tests/GreenfieldAPITests.cs index dbd135baf..b0fe5366a 100644 --- a/BTCPayServer.Tests/GreenfieldAPITests.cs +++ b/BTCPayServer.Tests/GreenfieldAPITests.cs @@ -994,6 +994,12 @@ namespace BTCPayServer.Tests Assert.Equal("updated",invoice.Metadata["itemCode"].Value()); Assert.Equal(15,((JArray) invoice.Metadata["newstuff"]).Values().Sum()); + + //also test the the metadata actually got saved + invoice = await client.GetInvoice(user.StoreId, newInvoice.Id); + Assert.Equal("updated",invoice.Metadata["itemCode"].Value()); + Assert.Equal(15,((JArray) invoice.Metadata["newstuff"]).Values().Sum()); + //archive await AssertHttpError(403, async () => {