Fix menu redirection to Pages

pull/17642/head
Enis Necipoglu 1 year ago
parent a1fff3ef2b
commit 15b8bac3cf
No known key found for this signature in database
GPG Key ID: 1EC55E13241E1680

@ -22,7 +22,7 @@ public class MenuItemManager : CmsKitDomainServiceBase
public virtual void SetPageUrl(MenuItem menuItem, Page page)
{
menuItem.SetPageId(page.Id);
menuItem.SetUrl(page.Slug);
menuItem.SetUrl(page.Slug.EnsureStartsWith('/'));
}
[UnitOfWork]

@ -70,7 +70,6 @@ public class MenuItemAdminAppService_Tests : CmsKitApplicationTestBase
});
});
var menu = await MenuRepository.FindAsync(TestData.MenuItem_1_Id);
menu.ShouldNotBeNull();
@ -83,7 +82,6 @@ public class MenuItemAdminAppService_Tests : CmsKitApplicationTestBase
{
await MenuAdminAppService.DeleteAsync(TestData.MenuItem_1_Id);
var menu = await MenuRepository.FindAsync(TestData.MenuItem_1_Id);
menu.ShouldBeNull();

@ -32,7 +32,7 @@ public class MenuManager_Test : CmsKitDomainTestBase
menuManager.SetPageUrl(menuItem, page);
menuItem.Url.ShouldNotBeNullOrEmpty();
menuItem.Url.ShouldBe(page.Slug);
menuItem.Url.ShouldBe(page.Slug.EnsureStartsWith('/'));
}
[Fact]

Loading…
Cancel
Save