diff options
Diffstat (limited to 'rt/t/web/template.t')
-rw-r--r-- | rt/t/web/template.t | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/rt/t/web/template.t b/rt/t/web/template.t index 40a5366dc..4a2e6c13a 100644 --- a/rt/t/web/template.t +++ b/rt/t/web/template.t @@ -1,8 +1,7 @@ -#!/usr/bin/perl use strict; use warnings; -use RT::Test tests => 19; +use RT::Test tests => 22; my $user_a = RT::Test->load_or_create_user( Name => 'user_a', Password => 'password', @@ -60,3 +59,35 @@ $m->title_is(q{Modify template Resolved}, 'modifying the Resolved template'); $m->form_name('ModifyTemplate'); is($m->value('Type'), 'Perl', 'now that we have ExecuteCode we can update Type to Perl'); +{ # 21152: Each time you save a Template a newline is chopped off the front + $m->form_name('ModifyTemplate'); + my $content; + + + TODO: { + + local $TODO = "WWW::Mechanize doesn't strip newline following <textarea> tag like browsers do"; + # this test fails because earlier tests add newlines when using Mech + like($content = $m->value('Content'), qr/^Subject: Resolved/, 'got expected Content'); + + } + + $content = "\n\n\n" . $content; + $m->field(Content => $content); + $m->submit; + + $m->content_contains('Template Resolved: Content updated'); + + # next submit should not result in an update + $m->form_name('ModifyTemplate'); + $m->submit; + + TODO: { + + local $TODO = "WWW::Mechanize doesn't strip newline following <textarea> tag like browsers do"; + # this test fails because the template change makes Mech continuously add newlines where browsers dont + $m->content_lacks('Template Resolved: Content updated'); + + } +} + |