mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
* Added docs for legacy mail service. * Updated namespaces. * Consolidated under Platform.Mail namespace * Updated obsolete comment. * Linting * Linting * Replaced documentation in original readme after accidental deletion.
21 lines
562 B
C#
21 lines
562 B
C#
using Bit.Core.Platform.Mail.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());
|
|
}
|
|
}
|