mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-24 15:05:24 -07:00
Correct the unit test
This commit is contained in:
parent
cf40f82699
commit
7ec9c59554
1 changed files with 8 additions and 1 deletions
|
@ -25,19 +25,26 @@ namespace Ombi.Core.Tests.Authentication
|
||||||
|
|
||||||
UserStore = new Mock<IUserStore<OmbiUser>>();
|
UserStore = new Mock<IUserStore<OmbiUser>>();
|
||||||
PlexApi = new Mock<IPlexApi>();
|
PlexApi = new Mock<IPlexApi>();
|
||||||
|
LdapApi = new Mock<ILdapUserManager>();
|
||||||
AuthenticationSettings = new Mock<ISettingsService<AuthenticationSettings>>();
|
AuthenticationSettings = new Mock<ISettingsService<AuthenticationSettings>>();
|
||||||
|
ManagementSettings = new Mock<ISettingsService<UserManagementSettings>>();
|
||||||
|
|
||||||
|
ManagementSettings.Setup(x => x.GetSettingsAsync()).ReturnsAsync(new UserManagementSettings());
|
||||||
|
|
||||||
AuthenticationSettings.Setup(x => x.GetSettingsAsync())
|
AuthenticationSettings.Setup(x => x.GetSettingsAsync())
|
||||||
.ReturnsAsync(new AuthenticationSettings());
|
.ReturnsAsync(new AuthenticationSettings());
|
||||||
_um = new OmbiUserManager(UserStore.Object, null, null, null, null, null, null, null, null,
|
_um = new OmbiUserManager(UserStore.Object, null, null, null, null, null, null, null, null,
|
||||||
PlexApi.Object, null, null, null, null, AuthenticationSettings.Object);
|
PlexApi.Object, null, null, null, null, AuthenticationSettings.Object, LdapApi.ObjectManagementSettings.Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OmbiUserManager _um { get; set; }
|
public OmbiUserManager _um { get; set; }
|
||||||
private Mock<IUserStore<OmbiUser>> UserStore { get; set; }
|
private Mock<IUserStore<OmbiUser>> UserStore { get; set; }
|
||||||
private Mock<IPlexApi> PlexApi { get; set; }
|
private Mock<IPlexApi> PlexApi { get; set; }
|
||||||
|
private Mock<ILdapUserManager> LdapApi { get; set; }
|
||||||
|
private Mock<ISettingsService<UserManagementSettings>> ManagementSettings { get; set; }
|
||||||
private Mock<ISettingsService<AuthenticationSettings>> AuthenticationSettings { get; set; }
|
private Mock<ISettingsService<AuthenticationSettings>> AuthenticationSettings { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task CheckPassword_PlexUser_EmailLogin_ValidPassword()
|
public async Task CheckPassword_PlexUser_EmailLogin_ValidPassword()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue