mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 08:32:50 -05:00
enable default appsettings for self hosted installs (#1263)
* enable default appsettings for self hosted installs * change setters to use arrow functions * fix tests * fix global settings ref
This commit is contained in:
16
test/Core.Test/AutoFixture/GlobalSettingsFixtures.cs
Normal file
16
test/Core.Test/AutoFixture/GlobalSettingsFixtures.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using AutoFixture;
|
||||
|
||||
namespace Bit.Core.Test.AutoFixture
|
||||
{
|
||||
internal class GlobalSettings : ICustomization
|
||||
{
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
fixture.Customize<Settings.GlobalSettings>(composer => composer
|
||||
.Without(s => s.BaseServiceUri)
|
||||
.Without(s => s.Attachment)
|
||||
.Without(s => s.Send)
|
||||
.Without(s => s.DataProtection));
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AutoFixture;
|
||||
using AutoFixture.Kernel;
|
||||
@ -21,7 +21,7 @@ namespace Bit.Core.Test.AutoFixture
|
||||
public SutProvider(IFixture fixture)
|
||||
{
|
||||
_dependencies = new Dictionary<Type, Dictionary<string, object>>();
|
||||
_fixture = (fixture ?? new Fixture()).WithAutoNSubstitutions();
|
||||
_fixture = (fixture ?? new Fixture()).WithAutoNSubstitutions().Customize(new GlobalSettings());
|
||||
_constructorParameterRelay = new ConstructorParameterRelay<TSut>(this, _fixture);
|
||||
_fixture.Customizations.Add(_constructorParameterRelay);
|
||||
}
|
||||
|
Reference in New Issue
Block a user