mirror of
https://github.com/bitwarden/server.git
synced 2026-02-19 07:13:17 +08:00
21 lines
557 B
C#
21 lines
557 B
C#
|
|
using Bit.Core.Platform.Mailer;
|
|||
|
|
using Bit.Core.Test.Platform.Mailer.TestMail;
|
|||
|
|
using Xunit;
|
|||
|
|
|
|||
|
|
namespace Bit.Core.Test.Platform.Mailer;
|
|||
|
|
|
|||
|
|
public class HandlebarMailRendererTests
|
|||
|
|
{
|
|||
|
|
[Fact]
|
|||
|
|
public async Task RenderAsync_ReturnsExpectedHtmlAndTxt()
|
|||
|
|
{
|
|||
|
|
var renderer = new HandlebarMailRenderer();
|
|||
|
|
var view = new TestMailView { Name = "John Smith" };
|
|||
|
|
|
|||
|
|
var (html, txt) = await renderer.RenderAsync(view);
|
|||
|
|
|
|||
|
|
Assert.Equal("Hello <b>John Smith</b>", html.Trim());
|
|||
|
|
Assert.Equal("Hello John Smith", txt.Trim());
|
|||
|
|
}
|
|||
|
|
}
|