Unified · Split
| @@ -1,9 +1,9 @@ | |||
| 1 | .DS_Store | 1 | .DS_Store |
| 2 | .bundle | 2 | .bundle |
| 3 | log | ||
| 3 | tmp | 4 | tmp |
| 4 | public/assets | 5 | public/assets |
| 5 | public/fonts | 6 | public/fonts |
| 6 | public/docs/**/* | 7 | public/docs/**/* |
| 7 | docs/**/* | 8 | docs/**/* |
| 8 | !docs/*.md | 9 | !docs/*.md |
| 9 | log | ||
| @@ -43,35 +43,6 @@ class AppTest < MiniTest::Spec · 42 unmodified lines | |||
| 43 | assert last_response.redirect? | 43 | assert last_response.redirect? |
| 44 | assert_equal 'https://example.org/', last_response['Location'] | 44 | assert_equal 'https://example.org/', last_response['Location'] |
| 45 | end | 45 | end |
| 46 | |||
| 47 | it "sets default size" do | ||
| 48 | get '/' | ||
| 49 | assert_includes last_response.body, 'data-size="20rem"' | ||
| 50 | end | ||
| 51 | |||
| 52 | it "sets size from cookie" do | ||
| 53 | set_cookie('size=42') | ||
| 54 | get '/' | ||
| 55 | assert_includes last_response.body, 'data-size="42px"' | ||
| 56 | end | ||
| 57 | |||
| 58 | it "sets layout from cookie" do | ||
| 59 | set_cookie('layout=foo') | ||
| 60 | get '/' | ||
| 61 | assert_includes last_response.body, '<body class="foo">' | ||
| 62 | end | ||
| 63 | |||
| 64 | it "sets the <html> theme from cookie" do | ||
| 65 | get '/' | ||
| 66 | assert_match %r{<html [^>]*class="[^\"]*_theme-default}, last_response.body | ||
| 67 | refute_includes last_response.body, '_theme-dark' | ||
| 68 | |||
| 69 | set_cookie('dark=1') | ||
| 70 | |||
| 71 | get '/' | ||
| 72 | assert_match %r{<html [^>]*class="[^\"]*_theme-dark}, last_response.body | ||
| 73 | refute_includes last_response.body, '_theme-default' | ||
| 74 | end | ||
| 75 | end | 46 | end |
| 76 | 47 | ||
| 77 | describe "/[static-page]" do | 48 | describe "/[static-page]" do |