Files
Umbraco-CMS/src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/AngularIntegration/ServerVariablesParserTests.cs

33 lines
845 B
C#
Raw Normal View History

using System.Collections.Generic;
using NUnit.Framework;
2016-02-17 13:28:11 +01:00
using Umbraco.Core;
using Umbraco.Web.WebAssets;
namespace Umbraco.Tests.Web.AngularIntegration
{
[TestFixture]
public class ServerVariablesParserTests
{
[Test]
public void Parse()
{
var d = new Dictionary<string, object>();
d.Add("test1", "Test 1");
d.Add("test2", "Test 2");
d.Add("test3", "Test 3");
d.Add("test4", "Test 4");
d.Add("test5", "Test 5");
2016-02-17 13:28:11 +01:00
var output = ServerVariablesParser.Parse(d).StripWhitespace();
Assert.IsTrue(output.Contains(@"Umbraco.Sys.ServerVariables = {
""test1"": ""Test 1"",
""test2"": ""Test 2"",
""test3"": ""Test 3"",
""test4"": ""Test 4"",
""test5"": ""Test 5""
2016-02-17 13:28:11 +01:00
} ;".StripWhitespace()));
}
}
2017-07-20 11:21:28 +02:00
}