From 6a0a8a12691f48799172f6443a1cf1b5501056b0 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Mon, 26 Nov 2007 16:21:06 +0000 Subject: [PATCH] ActionItem21: testing some filesystem stuff --- test/unit/article_test.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/unit/article_test.rb b/test/unit/article_test.rb index f8e6231..db16cb8 100644 --- a/test/unit/article_test.rb +++ b/test/unit/article_test.rb @@ -48,7 +48,15 @@ class ArticleTest < Test::Unit::TestCase end should 'act as filesystem' do - flunk 'not yet' + a = Article.create!(:name => 'my article', :profile_id => profile.id) + b = a.children.build(:name => 'child article', :profile_id => profile.id) + b.save! + assert_equal 'my-article/child-article', b.path + + a.name = 'another name' + a.save! + + assert_equal 'another-name/child-article', Article.find(b.id).path end end -- libgit2 0.21.2