Skip to content

Commit

Permalink
Incremented version, added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krönert committed Jan 19, 2023
1 parent fcd36a4 commit 3efa97c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let sha = Git.Information.getCurrentHash()
// version info
let major = "3"
let minor = "9"
let patch = "4"
let patch = "5"

// Follow SemVer scheme: http://semver.org/
let asmVersion = major + "." + minor + "." + patch
Expand Down
29 changes: 29 additions & 0 deletions src/test/Xrm.Oss.XTL.Templating.Tests/XTLProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -886,5 +886,34 @@ public void It_Should_Not_Throw_On_Custom_Action_If_Throw_Flag_Not_Set()

Assert.That(() => context.ExecutePluginWith<XTLProcessor>(pluginContext), Throws.Nothing);
}

[Test]
public void It_Should_Not_Break_HTML_Encoded_Stuff()
{
var context = new XrmFakedContext();
var dynamicsFromText = "<b>From:</b> Microsoft Power Platform &lt;powerplat-noreply@microsoft.com&gt;; <br><b>";

var email = new Entity
{
Id = Guid.NewGuid(),
LogicalName = "email",
Attributes =
{
{ "subject", "Demo" },
{ "description", dynamicsFromText }
}
};

var pluginContext = context.GetDefaultPluginContext();
pluginContext.InputParameters = new ParameterCollection
{
{ "Target", email }
};

var config = @"{ ""targetField"": ""description"", ""templateField"": ""description"" }";
context.ExecutePluginWithConfigurations<XTLProcessor>(pluginContext, config, string.Empty);

Assert.That(email.GetAttributeValue<string>("description"), Is.EqualTo(dynamicsFromText));
}
}
}

0 comments on commit 3efa97c

Please sign in to comment.