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/functional/nodes_controller_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/functional/nodes_controller_test.rb')
| -rw-r--r-- | test/functional/nodes_controller_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/nodes_controller_test.rb b/test/functional/nodes_controller_test.rb index edc49b6..1c7e607 100644 --- a/test/functional/nodes_controller_test.rb +++ b/test/functional/nodes_controller_test.rb | |||
| @@ -5,6 +5,7 @@ class NodesControllerTest < ActionController::TestCase | |||
| 5 | include AuthenticatedTestHelper | 5 | include AuthenticatedTestHelper |
| 6 | 6 | ||
| 7 | def test_get_index | 7 | def test_get_index |
| 8 | Node.root.descendants.delete_all | ||
| 8 | login_as :quentin | 9 | login_as :quentin |
| 9 | get :index | 10 | get :index |
| 10 | assert_response :success | 11 | assert_response :success |
| @@ -26,6 +27,9 @@ class NodesControllerTest < ActionController::TestCase | |||
| 26 | login_as :quentin | 27 | login_as :quentin |
| 27 | 28 | ||
| 28 | node = Node.find_by_unique_name("fourth_child") | 29 | node = Node.find_by_unique_name("fourth_child") |
| 30 | node.pages.create | ||
| 31 | node.draft = node.pages.last | ||
| 32 | node.save | ||
| 29 | 33 | ||
| 30 | assert_equal 1, node.pages.length | 34 | assert_equal 1, node.pages.length |
| 31 | 35 | ||
