1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-02 13:53:23 +01:00
bitwarden-server/test/Core.Test/Models/OrganizationConnectionConfigs/ScimConfigTests.cs
Vincent Salucci 9a1a369472
[AC-1201] refactor: move all SCIM related files into the AdminConsole scope (#2841)
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-04-19 09:31:00 +10:00

24 lines
676 B
C#

using Bit.Core.AdminConsole.Models.OrganizationConnectionConfigs;
using Xunit;
namespace Bit.Core.Test.Models.OrganizationConnectionConfigs;
public class ScimConfigTests
{
[Fact]
public void ScimConfig_CanUse_Success()
{
var config = new ScimConfig() { Enabled = true };
Assert.True(config.Validate(out var exception));
Assert.True(string.IsNullOrEmpty(exception));
}
[Fact]
public void ScimConfig_CanUse_WhenDisabled_ReturnsFalse()
{
var config = new ScimConfig() { Enabled = false };
Assert.False(config.Validate(out var exception));
Assert.Contains("Config is disabled", exception);
}
}