1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[EC-826] Merge license sync feature branch to master (#2587)

* [EC-634] Extract GenerateLicenseAsync to a query (#2373)

* [EC-637] Add license sync to server (#2453)

* [EC-1036] Show correct license sync date (#2626)

* Update method name per new pattern
This commit is contained in:
Thomas Rittson
2023-01-31 07:42:10 +10:00
committed by GitHub
parent d0355fcd12
commit 82908b1fb7
37 changed files with 746 additions and 123 deletions

View File

@ -0,0 +1,27 @@
using Bit.Core.Models.OrganizationConnectionConfigs;
using Bit.Test.Common.AutoFixture.Attributes;
using Xunit;
namespace Bit.Core.Test.Models.OrganizationConnectionConfigs;
public class BillingSyncConfigTests
{
[Theory]
[BitAutoData]
public void BillingSyncConfig_CanUse_Success(string billingSyncKey)
{
var config = new BillingSyncConfig() { BillingSyncKey = billingSyncKey };
Assert.True(config.Validate(out var exception));
Assert.True(string.IsNullOrEmpty(exception));
}
[Fact]
public void BillingSyncConfig_CanUse_WhenNoKey_ReturnsFalse()
{
var config = new BillingSyncConfig();
Assert.False(config.Validate(out var exception));
Assert.Contains("Failed to get Billing Sync Key", exception);
}
}