mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing Layout zone detection in placement
This commit is contained in:
@@ -7,6 +7,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
|
||||
[Test]
|
||||
public void ZoneShouldBeParsed() {
|
||||
Assert.That(new PlacementInfo { Location = "/Content" }.GetZone(), Is.EqualTo("Content"));
|
||||
Assert.That(new PlacementInfo { Location = "Content" }.GetZone(), Is.EqualTo("Content"));
|
||||
Assert.That(new PlacementInfo { Location = "Content:5" }.GetZone(), Is.EqualTo("Content"));
|
||||
Assert.That(new PlacementInfo { Location = "Content:5#Tab1" }.GetZone(), Is.EqualTo("Content"));
|
||||
@@ -24,7 +25,6 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
Assert.That(new PlacementInfo { Location = "Content:5@Group1#Tab1" }.GetPosition(), Is.EqualTo("5"));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void LayoutZoneShouldBeParsed() {
|
||||
Assert.That(new PlacementInfo { Location = "/Content" }.IsLayoutZone(), Is.EqualTo(true));
|
||||
|
@@ -41,7 +41,7 @@ namespace Orchard.DisplayManagement.Descriptors {
|
||||
}
|
||||
|
||||
public bool IsLayoutZone() {
|
||||
return GetZone().StartsWith("/");
|
||||
return Location.StartsWith("/");
|
||||
}
|
||||
|
||||
public string GetTab() {
|
||||
|
Reference in New Issue
Block a user