Commit 6a0a8a12691f48799172f6443a1cf1b5501056b0
1 parent
0814a5ef
Exists in
master
and in
29 other branches
ActionItem21: testing some filesystem stuff
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@946 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
9 additions
and
1 deletions
Show diff stats
test/unit/article_test.rb
... | ... | @@ -48,7 +48,15 @@ class ArticleTest < Test::Unit::TestCase |
48 | 48 | end |
49 | 49 | |
50 | 50 | should 'act as filesystem' do |
51 | - flunk 'not yet' | |
51 | + a = Article.create!(:name => 'my article', :profile_id => profile.id) | |
52 | + b = a.children.build(:name => 'child article', :profile_id => profile.id) | |
53 | + b.save! | |
54 | + assert_equal 'my-article/child-article', b.path | |
55 | + | |
56 | + a.name = 'another name' | |
57 | + a.save! | |
58 | + | |
59 | + assert_equal 'another-name/child-article', Article.find(b.id).path | |
52 | 60 | end |
53 | 61 | |
54 | 62 | end | ... | ... |