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
This commit is contained in:
Shannon Deminick
2013-05-12 21:44:02 -10:00
parent d58487fafc
commit 822cac5d87
3 changed files with 7 additions and 2 deletions

View File

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

View File

@@ -222,6 +222,10 @@ namespace Umbraco.Tests.PublishedContent
var propVal2 = doc.GetPropertyValue<IHtmlString>("content");
Assert.IsTrue(TypeHelper.IsTypeAssignableFrom<IHtmlString>(propVal2.GetType()));
Assert.AreEqual("<div>This is some content</div>", propVal2.ToString());
var propVal3 = doc.GetPropertyValue("Content");
Assert.IsTrue(TypeHelper.IsTypeAssignableFrom<IHtmlString>(propVal3.GetType()));
Assert.AreEqual("<div>This is some content</div>", propVal3.ToString());
}
[Test]

View File

@@ -146,7 +146,8 @@ namespace umbraco.cms.businesslogic
public static Guid GetDataType(string contentTypeAlias, string propertyTypeAlias)
{
var key = new System.Tuple<string, string>(contentTypeAlias, propertyTypeAlias);
//propertyTypeAlias needs to be invariant, so we will store uppercase
var key = new System.Tuple<string, string>(contentTypeAlias, propertyTypeAlias.ToUpper());
return PropertyTypeCache.GetOrAdd(