mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-13 19:37:37 +01:00
Fix LockSubscription bug (#3081)
This addresses an obscure issue where `LockSubscription` is unintentionally set to `true`, which results in a large number of tests failing. h/t to @NicholasDorier for the assist.
This commit is contained in:
parent
fa10249893
commit
931aa297cd
1 changed files with 11 additions and 0 deletions
|
@ -215,6 +215,17 @@ namespace BTCPayServer.Tests
|
|||
IsAdmin = isAdmin
|
||||
};
|
||||
await account.Register(RegisterDetails);
|
||||
|
||||
//this addresses an obscure issue where LockSubscription is unintentionally set to "true",
|
||||
//resulting in a large number of tests failing.
|
||||
if (account.RegisteredUserId == null)
|
||||
{
|
||||
var settings = parent.PayTester.GetService<SettingsRepository>();
|
||||
var policies = await settings.GetSettingAsync<PoliciesSettings>() ?? new PoliciesSettings();
|
||||
policies.LockSubscription = false;
|
||||
await account.Register(RegisterDetails);
|
||||
}
|
||||
|
||||
UserId = account.RegisteredUserId;
|
||||
IsAdmin = account.RegisteredAdmin;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue