Commit 52b269a64d4b8a2d66de26981e63edaf958414ff
1 parent
a2e9d04b
Exists in
master
and in
28 other branches
r279@sede: terceiro | 2007-07-30 11:41:20 -0300
ActionItem0: adding tests for Design::Template git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@283 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
19 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +require File.dirname(__FILE__) + '/test_helper' | |
| 2 | + | |
| 3 | +class TemplateTest < Test::Unit::TestCase | |
| 4 | + | |
| 5 | + include Design | |
| 6 | + | |
| 7 | + def test_should_read_title | |
| 8 | + assert_equal 'Some title', Template.new('test', { 'title' => 'Some title' }).title | |
| 9 | + end | |
| 10 | + | |
| 11 | + def test_should_get_name | |
| 12 | + assert_equal 'default', Template.find('default').name | |
| 13 | + end | |
| 14 | + | |
| 15 | + def test_should_get_number_of_boxes | |
| 16 | + assert_equal 3, Template.new('test', { 'number_of_boxes' => 3}).number_of_boxes | |
| 17 | + end | |
| 18 | + | |
| 19 | +end | ... | ... |