mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 01:43:50 +01:00
Add a test catching expirationTime bug (#1336)
This commit is contained in:
parent
c598a1827f
commit
e6acc19bcc
@ -2493,12 +2493,15 @@ noninventoryitem:
|
|||||||
var user = tester.NewAccount();
|
var user = tester.NewAccount();
|
||||||
user.GrantAccess();
|
user.GrantAccess();
|
||||||
user.RegisterDerivationScheme("BTC");
|
user.RegisterDerivationScheme("BTC");
|
||||||
|
DateTimeOffset expiration = DateTimeOffset.UtcNow + TimeSpan.FromMinutes(21);
|
||||||
var invoice1 = user.BitPay.CreateInvoice(new Invoice()
|
var invoice1 = user.BitPay.CreateInvoice(new Invoice()
|
||||||
{
|
{
|
||||||
Price = 0.000000012m,
|
Price = 0.000000012m,
|
||||||
Currency = "USD",
|
Currency = "USD",
|
||||||
FullNotifications = true
|
FullNotifications = true,
|
||||||
|
ExpirationTime = expiration
|
||||||
}, Facade.Merchant);
|
}, Facade.Merchant);
|
||||||
|
Assert.Equal(expiration.ToUnixTimeSeconds(), invoice1.ExpirationTime.ToUnixTimeSeconds());
|
||||||
var invoice2 = user.BitPay.CreateInvoice(new Invoice()
|
var invoice2 = user.BitPay.CreateInvoice(new Invoice()
|
||||||
{
|
{
|
||||||
Price = 0.000000019m,
|
Price = 0.000000019m,
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NBitpayClient" Version="1.0.0.35" />
|
<PackageReference Include="NBitpayClient" Version="1.0.0.38" />
|
||||||
<PackageReference Include="DBriize" Version="1.0.1.3" />
|
<PackageReference Include="DBriize" Version="1.0.1.3" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.2" />
|
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.2" />
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
<add key="Openiddict" value="https://www.myget.org/F/openiddict/api/v3/index.json" />
|
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user