Merge pull request #2209 from btcpayserver/invoice-metadata-test

Improve test on Greenfield Inoice metadata update
This commit is contained in:
Nicolas Dorier 2021-01-30 11:17:11 +09:00 committed by GitHub
commit 03d2f6c017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -994,6 +994,12 @@ namespace BTCPayServer.Tests
Assert.Equal("updated",invoice.Metadata["itemCode"].Value<string>());
Assert.Equal(15,((JArray) invoice.Metadata["newstuff"]).Values<int>().Sum());
//also test the the metadata actually got saved
invoice = await client.GetInvoice(user.StoreId, newInvoice.Id);
Assert.Equal("updated",invoice.Metadata["itemCode"].Value<string>());
Assert.Equal(15,((JArray) invoice.Metadata["newstuff"]).Values<int>().Sum());
//archive
await AssertHttpError(403, async () =>
{