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 /app/models/node.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 'app/models/node.rb')
| -rw-r--r-- | app/models/node.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/node.rb b/app/models/node.rb index 647a86a..2a82ba8 100644 --- a/app/models/node.rb +++ b/app/models/node.rb | |||
| @@ -67,7 +67,7 @@ class Node < ActiveRecord::Base | |||
| 67 | end | 67 | end |
| 68 | 68 | ||
| 69 | def create_new_draft user | 69 | def create_new_draft user |
| 70 | empty_page = self.pages.create | 70 | empty_page = self.pages.create! |
| 71 | empty_page.user = user | 71 | empty_page.user = user |
| 72 | empty_page.save | 72 | empty_page.save |
| 73 | 73 | ||
