Moving adding members services to correct project for use on the front-end, not just the back-office.

This commit is contained in:
Emma Garland
2021-02-14 12:57:48 +00:00
parent a4ee8055f9
commit 167811b23b
4 changed files with 28 additions and 35 deletions

View File

@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using NUnit.Framework;
using Umbraco.Core.DependencyInjection;
using Umbraco.Infrastructure.Security;
using Umbraco.Tests.Integration.Testing;
using Umbraco.Web.Common.DependencyInjection;
namespace Umbraco.Tests.Integration.Umbraco.Web.Common
{
[TestFixture]
public class MembersServiceCollectionExtensionsTests : UmbracoIntegrationTest
{
protected override void CustomTestSetup(IUmbracoBuilder builder) => builder.Services.AddMembersIdentity();
[Test]
public void AddMembersIdentity_ExpectMembersUserStoreResolvable()
{
IUserStore<MembersIdentityUser> userStore = Services.GetService<IUserStore<MembersIdentityUser>>();
Assert.IsNotNull(userStore);
Assert.AreEqual(typeof(MembersUserStore), userStore.GetType());
}
[Test]
public void AddMembersIdentity_ExpectMembersUserManagerResolvable()
{
IMemberManager userManager = Services.GetService<IMemberManager>();
Assert.NotNull(userManager);
}
}
}