From 822cac5d8729fb93d0ebf0aae2e5f66452452cae Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Sun, 12 May 2013 21:44:02 -1000 Subject: [PATCH] Adds test for #U4-2207 which will now pass but it will still fail on the website because of the case sensitive checking for the default proeprty editor lookup. Need feedback from sebastian before continuing --- .../PublishedContent/PublishedContentTestBase.cs | 2 +- src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs | 4 ++++ src/umbraco.cms/businesslogic/ContentType.cs | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs index 3b1c328731..60c80033d6 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs @@ -30,7 +30,7 @@ namespace Umbraco.Tests.PublishedContent //need to specify a custom callback for unit tests PublishedContentHelper.GetDataTypeCallback = (docTypeAlias, propertyAlias) => { - if (propertyAlias == "content") + if (propertyAlias.InvariantEquals("content")) { //return the rte type id return Guid.Parse("5e9b75ae-face-41c8-b47e-5f4b0fd82f83"); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 6f50398cc7..3c2451b113 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -222,6 +222,10 @@ namespace Umbraco.Tests.PublishedContent var propVal2 = doc.GetPropertyValue("content"); Assert.IsTrue(TypeHelper.IsTypeAssignableFrom(propVal2.GetType())); Assert.AreEqual("
This is some content
", propVal2.ToString()); + + var propVal3 = doc.GetPropertyValue("Content"); + Assert.IsTrue(TypeHelper.IsTypeAssignableFrom(propVal3.GetType())); + Assert.AreEqual("
This is some content
", propVal3.ToString()); } [Test] diff --git a/src/umbraco.cms/businesslogic/ContentType.cs b/src/umbraco.cms/businesslogic/ContentType.cs index 2013b898f5..9220ddf918 100644 --- a/src/umbraco.cms/businesslogic/ContentType.cs +++ b/src/umbraco.cms/businesslogic/ContentType.cs @@ -146,7 +146,8 @@ namespace umbraco.cms.businesslogic public static Guid GetDataType(string contentTypeAlias, string propertyTypeAlias) { - var key = new System.Tuple(contentTypeAlias, propertyTypeAlias); + //propertyTypeAlias needs to be invariant, so we will store uppercase + var key = new System.Tuple(contentTypeAlias, propertyTypeAlias.ToUpper()); return PropertyTypeCache.GetOrAdd(