Commit 9cb612ce754c9493d0e4f0780cd40357bfd754b5

Authored by AntonioTerceiro
1 parent 5dfeba4f

ActionItem8: addign test for Article



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@449 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 19 additions and 0 deletions   Show diff stats
test/unit/article_test.rb 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +require File.dirname(__FILE__) + '/../test_helper'
  2 +
  3 +class ArticleTest < Test::Unit::TestCase
  4 + fixtures :comatose_pages
  5 +
  6 + def test_should_use_keywords_as_tags
  7 + article = Article.new
  8 + article.title = 'a test article'
  9 + article.body = 'lalala'
  10 + article.parent = Article.find_by_path('ze')
  11 + article.keywords = 'one, two, three'
  12 + article.save!
  13 +
  14 + assert article.has_keyword?('one')
  15 + assert article.has_keyword?('two')
  16 + assert article.has_keyword?('three')
  17 + end
  18 +
  19 +end
... ...