Commit e7591bfe49c839cac4198e620f7bb8cd1a99bcdb
1 parent
b9b5f4ec
Exists in
staging
and in
42 other branches
ActionItem24: some articles can indicate that they don't accept childern articles
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1142 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
app/models/article.rb
| ... | ... | @@ -94,9 +94,12 @@ class Article < ActiveRecord::Base |
| 94 | 94 | self.name.gsub(/article$/i, '') |
| 95 | 95 | end |
| 96 | 96 | |
| 97 | - include ActionController::UrlWriter | |
| 98 | 97 | def url |
| 99 | 98 | self.profile.url + self.public_path(false) |
| 100 | 99 | end |
| 101 | 100 | |
| 101 | + def allow_children? | |
| 102 | + true | |
| 103 | + end | |
| 104 | + | |
| 102 | 105 | end | ... | ... |
test/unit/article_test.rb
| ... | ... | @@ -159,7 +159,7 @@ class ArticleTest < Test::Unit::TestCase |
| 159 | 159 | end |
| 160 | 160 | |
| 161 | 161 | should 'indicate wheter children articles are allowed or not' do |
| 162 | - flunk 'pending' | |
| 162 | + assert_equal true, Article.new.allow_children? | |
| 163 | 163 | end |
| 164 | 164 | |
| 165 | 165 | should 'provide a url to itself' do | ... | ... |