diff options
| author | hukl <contact@smyck.org> | 2009-07-18 18:17:06 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-07-18 18:17:06 +0200 |
| commit | 144b18c5db61c53028177680295f3fc9d4e8711d (patch) | |
| tree | dfed99c6a59487af6279ce15c02dbc366328602d /test/unit/page_test.rb | |
| parent | aab86f2d2a0258a1347f39c1ee4081cd06bac56b (diff) | |
Test::Unit Fixtures can't handle globalize2's translated attributes which is why its impossible to set translated attributes via fixtures. Therefor I removed the page fixtures entirely and and made sure that a title is set to "Untitled" when it is not specified otherwise.
If a new node is created, its initial draft has "Untitled" set as title automatically.
Modified tests accordingly
Diffstat (limited to 'test/unit/page_test.rb')
| -rw-r--r-- | test/unit/page_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb index 8c2fc95..a2083c0 100644 --- a/test/unit/page_test.rb +++ b/test/unit/page_test.rb | |||
| @@ -22,7 +22,7 @@ class PageTest < ActiveSupport::TestCase | |||
| 22 | d1.tag_list = "update" | 22 | d1.tag_list = "update" |
| 23 | d1.save | 23 | d1.save |
| 24 | n1.publish_draft! | 24 | n1.publish_draft! |
| 25 | 25 | ||
| 26 | d2 = n1.find_or_create_draft @user1 | 26 | d2 = n1.find_or_create_draft @user1 |
| 27 | n1.publish_draft! | 27 | n1.publish_draft! |
| 28 | 28 | ||
| @@ -30,7 +30,7 @@ class PageTest < ActiveSupport::TestCase | |||
| 30 | d3.tag_list = "update, pressemitteilung" | 30 | d3.tag_list = "update, pressemitteilung" |
| 31 | d3.save | 31 | d3.save |
| 32 | n2.publish_draft! | 32 | n2.publish_draft! |
| 33 | 33 | ||
| 34 | d4 = n2.find_or_create_draft @user1 | 34 | d4 = n2.find_or_create_draft @user1 |
| 35 | n2.publish_draft! | 35 | n2.publish_draft! |
| 36 | 36 | ||
| @@ -63,7 +63,7 @@ class PageTest < ActiveSupport::TestCase | |||
| 63 | I18n.locale = :de | 63 | I18n.locale = :de |
| 64 | 64 | ||
| 65 | d.body = before | 65 | d.body = before |
| 66 | d.save | 66 | d.save! |
| 67 | 67 | ||
| 68 | assert_equal after, d.body | 68 | assert_equal after, d.body |
| 69 | end | 69 | end |
