Adapt welcome wallpaper to SGU gender
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using SGU.AuthBroker.Core.Profiles;
|
||||
using SGU.AuthBroker.Services;
|
||||
using Xunit;
|
||||
|
||||
namespace SGU.AuthBroker.Tests;
|
||||
|
||||
public sealed class ActiveDirectorySynchronizerTests
|
||||
{
|
||||
[Fact]
|
||||
public void GenderMetadataPreservesUnmanagedNotesAndReplacesItsManagedLine()
|
||||
{
|
||||
const string existing = " Responsable de laboratorio \r\n\r\nSGU-Gender: Male\r\nTurno vespertino";
|
||||
|
||||
string? updated = ActiveDirectorySynchronizer.MergeGenderMetadata(
|
||||
existing,
|
||||
InstitutionalGender.Female);
|
||||
|
||||
Assert.Equal(
|
||||
" Responsable de laboratorio \r\n\r\nTurno vespertino\r\nSGU-Gender: Female",
|
||||
updated);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GenderMetadataDoesNotTruncateAnExistingFullNotesField()
|
||||
{
|
||||
string existing = new('x', 1024);
|
||||
|
||||
string? updated = ActiveDirectorySynchronizer.MergeGenderMetadata(
|
||||
existing,
|
||||
InstitutionalGender.Male);
|
||||
|
||||
Assert.Null(updated);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user