diff options
| author | hukl <contact@smyck.org> | 2009-02-27 16:53:11 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-27 16:53:11 +0100 |
| commit | 69a37065f9f523c25bc4edb9c70a9b21578d46f6 (patch) | |
| tree | 550e750f9c48dee36f472fa1c8bae54e5bd95f17 /test/unit | |
| parent | 463da8c96569f4ef9450f0eb75c7209f6a25b84b (diff) | |
more tests and fixes. always write tests - they are so good!
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/page_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb index bf4bca1..21b8910 100644 --- a/test/unit/page_test.rb +++ b/test/unit/page_test.rb | |||
| @@ -14,10 +14,11 @@ class PageTest < ActiveSupport::TestCase | |||
| 14 | n1.move_to_child_of Node.root | 14 | n1.move_to_child_of Node.root |
| 15 | n2.move_to_child_of Node.root | 15 | n2.move_to_child_of Node.root |
| 16 | 16 | ||
| 17 | # get the drafts created_with | 17 | # get the drafts and assign a user to it |
| 18 | assert_not_nil d1 = n1.find_or_create_draft( @user1 ) | 18 | assert_not_nil d1 = n1.find_or_create_draft( @user1 ) |
| 19 | assert_not_nil d3 = n2.find_or_create_draft( @user1 ) | 19 | assert_not_nil d3 = n2.find_or_create_draft( @user1 ) |
| 20 | 20 | ||
| 21 | # tag and double publish so we have 4 pages tagged with "update" | ||
| 21 | d1.tag_list = "update" | 22 | d1.tag_list = "update" |
| 22 | d1.save | 23 | d1.save |
| 23 | n1.publish_draft! | 24 | n1.publish_draft! |
| @@ -33,6 +34,7 @@ class PageTest < ActiveSupport::TestCase | |||
| 33 | d4 = n2.find_or_create_draft @user1 | 34 | d4 = n2.find_or_create_draft @user1 |
| 34 | n2.publish_draft! | 35 | n2.publish_draft! |
| 35 | 36 | ||
| 37 | # Set up two options hashes for the assertions | ||
| 36 | options1 = { | 38 | options1 = { |
| 37 | :tags => "update" | 39 | :tags => "update" |
| 38 | } | 40 | } |
