From 144b18c5db61c53028177680295f3fc9d4e8711d Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 18 Jul 2009 18:17:06 +0200 Subject: 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 --- test/unit/node_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/unit/node_test.rb') diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb index e054887..ef298bb 100644 --- a/test/unit/node_test.rb +++ b/test/unit/node_test.rb @@ -5,7 +5,11 @@ class NodeTest < ActiveSupport::TestCase def setup @root = Node.find(1) @first_child = Node.find(2) + @first_child.pages.create! :title => "one" + @first_child.draft = @first_child.pages.last + @first_child.save @second_child = Node.find(3) + @second_child.pages.create! :title => "one" @user1 = User.create :login => 'demo', :email => "f@b.com", :password => 'foobar', :password_confirmation => 'foobar' @user2 = User.create :login => 'show', :email => "f@b.com", :password => 'foobar', :password_confirmation => 'foobar' -- cgit v1.3