Commit e483adc385aef40e353a5662a7f8ea8fb133d978

Authored by MoisesMachado
1 parent 41fa418a

ActionItem501: removed a obsolete test


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2171 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 0 additions and 16 deletions   Show diff stats
test/unit/product_category_test.rb
1 require File.dirname(__FILE__) + '/../test_helper' 1 require File.dirname(__FILE__) + '/../test_helper'
2 2
3 class ProductCategoryTest < Test::Unit::TestCase 3 class ProductCategoryTest < Test::Unit::TestCase
4 - # TODO: please write tests here when ProductCategory has something  
5 - def test_require_same_class_for_children  
6 - c1 = ProductCategory.new(:name => 'Some Product Type', :environment => Environment.default)  
7 - c1.save!  
8 -  
9 - c2 = Category.new(:name => 'wrong', :environment => Environment.default)  
10 - c1.children << c2  
11 -  
12 - assert !c2.valid?  
13 - assert c2.errors.invalid?(:type)  
14 -  
15 - c3 = ProductCategory.new(:name => 'right', :environment => Environment.default)  
16 - c1.children << c3  
17 - assert c3.valid?  
18 - assert !c3.errors.invalid?(:type)  
19 - end  
20 4
21 def test_all_products 5 def test_all_products
22 c0 = ProductCategory.create!(:name => 'base_cat', :environment => Environment.default) 6 c0 = ProductCategory.create!(:name => 'base_cat', :environment => Environment.default)