Fixing Layout zone detection in placement

This commit is contained in:
Sebastien Ros 2013-10-21 16:03:49 -07:00
parent 74fe95ddd9
commit b43453a0f1
2 changed files with 2 additions and 2 deletions

View File

@ -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));

View File

@ -41,7 +41,7 @@ namespace Orchard.DisplayManagement.Descriptors {
}
public bool IsLayoutZone() {
return GetZone().StartsWith("/");
return Location.StartsWith("/");
}
public string GetTab() {