mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-08-01 17:25:05 +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]
|
[Test]
|
||||||
public void ZoneShouldBeParsed() {
|
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" }.GetZone(), Is.EqualTo("Content"));
|
||||||
Assert.That(new PlacementInfo { Location = "Content:5" }.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"));
|
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"));
|
Assert.That(new PlacementInfo { Location = "Content:5@Group1#Tab1" }.GetPosition(), Is.EqualTo("5"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void LayoutZoneShouldBeParsed() {
|
public void LayoutZoneShouldBeParsed() {
|
||||||
Assert.That(new PlacementInfo { Location = "/Content" }.IsLayoutZone(), Is.EqualTo(true));
|
Assert.That(new PlacementInfo { Location = "/Content" }.IsLayoutZone(), Is.EqualTo(true));
|
||||||
|
@ -41,7 +41,7 @@ namespace Orchard.DisplayManagement.Descriptors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool IsLayoutZone() {
|
public bool IsLayoutZone() {
|
||||||
return GetZone().StartsWith("/");
|
return Location.StartsWith("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetTab() {
|
public string GetTab() {
|
||||||
|
Loading…
Reference in New Issue
Block a user