mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-31 01:57:39 +08:00
Fixing Layout zone detection in placement
This commit is contained in:
parent
74fe95ddd9
commit
b43453a0f1
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user