Browse Source

Improved tests.

Martin Edenhofer 10 years ago
parent
commit
8bf6a28781
2 changed files with 3 additions and 2 deletions
  1. 1 2
      app/models/channel/email_build.rb
  2. 2 0
      test/unit/email_build_test.rb

+ 1 - 2
app/models/channel/email_build.rb

@@ -93,8 +93,7 @@ module Channel::EmailBuild
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>'
   <head>
-  <body style="#{css}">
-  </body>
+  <body style="#{css}">#{html}</body>
 </html>
 HERE
 

+ 2 - 0
test/unit/email_build_test.rb

@@ -11,6 +11,7 @@ class EmailBuildTest < ActiveSupport::TestCase
     assert( result !~ /^.+?<\!DOCTYPE/, 'test 1')
     assert( result =~ /<html>/, 'test 1')
     assert( result =~ /font-family/, 'test 1')
+    assert( result =~ /<b>test<\/b>/, 'test 1')
 
 
     html   = 'invalid <!DOCTYPE html><html><b>test</b></html>'
@@ -20,6 +21,7 @@ class EmailBuildTest < ActiveSupport::TestCase
     assert( result =~ /^.+?<\!DOCTYPE/, 'test 2')
     assert( result =~ /<html>/, 'test 2')
     assert( result !~ /font-family/, 'test 2')
+    assert( result =~ /<b>test<\/b>/, 'test 2')
 
   end
 end