use strict;
use warnings;
use RT::Test nodb => 1, tests => 6;
use RT::Interface::Web; # This gets us HTML::Mason::Commands
use Test::LongString;
{
my $html = 'This is a test of color and font and boldness.';
is_string(scrub_html($html), $html, "CKEditor produced HTML sails through");
}
{
my $html = '
And alignment with color?
';
is_string(scrub_html($html), $html, "CKEditor produced HTML sails through");
}
{
my $html = 'This is a test of color and font and boldness.';
my $expected = 'This is a test of color and font and boldness.';
is_string(scrub_html($html), $expected, "nasty CSS not allowed through");
}
{
my $html = 'Let\'s add some color up in here.';
is_string(scrub_html($html), $html, "multiple props and color specs allowed");
}
{
my $html = q[oh hai I'm some text];
my $expected = q[oh hai I'm some text];
is_string(scrub_html($html), $expected, "font lists");
}
{
my $html = q[oh hai I'm some text];
my $expected = q[oh hai I'm some text];
is_string(scrub_html($html), $expected, "outlook html");
}
sub scrub_html {
return HTML::Mason::Commands::ScrubHTML(shift);
}