This repository was archived by the owner on Dec 16, 2021. It is now read-only.
forked from premailer/premailer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfuture_tests.rb
50 lines (38 loc) · 1.58 KB
/
future_tests.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# encoding: UTF-8
require File.expand_path(File.dirname(__FILE__)) + '/helper'
class TestPremailer < Premailer::TestCase
def test_related_attributes
flunk 'Not implemented'
local_setup
# h1 { text-align: center; }
assert_equal 'center', @doc.at('h1')['align']
# td { vertical-align: top; }
assert_equal 'top', @doc.at('td')['valign']
# p { vertical-align: top; } -- not allowed
assert_nil @doc.at('p')['valign']
# no align attr is specified for <p> elements, so it should not appear
assert_nil @doc.at('p.unaligned')['align']
# .contact { background: #9EC03B url("contact_bg.png") repeat 0 0; }
assert_equal '#9EC03B', @doc.at('td.contact')['bgcolor']
# body { background-color: #9EBF00; }
assert_equal '#9EBF00', @doc.at('body')['bgcolor']
end
def test_merging_cellpadding
flunk 'Not implemented'
local_setup('cellpadding.html', {:prefer_cellpadding => true})
assert_equal '0', @doc.at('#t1')['cellpadding']
assert_match /padding\:/i, @doc.at('#t1 td')['style']
assert_equal '5', @doc.at('#t2')['cellpadding']
assert_no_match /padding\:/i, @doc.at('#t2 td')['style']
assert_nil @doc.at('#t3')['cellpadding']
assert_match /padding\:/i, @doc.at('#t3 td')['style']
assert_nil @doc.at('#t4')['cellpadding']
assert_match /padding\:/i, @doc.at('#t4a')['style']
assert_match /padding\:/i, @doc.at('#t4b')['style']
end
def test_preserving_media_queries
flunk 'Not implemented'
local_setup
assert_match /display\: none/i, @doc.at('#iphone')['style']
end
end