diff --git a/test/functional/catalog_controller_test.rb b/test/functional/catalog_controller_test.rb index 27e0c4c..e9a8ed8 100644 --- a/test/functional/catalog_controller_test.rb +++ b/test/functional/catalog_controller_test.rb @@ -11,8 +11,17 @@ class CatalogControllerTest < Test::Unit::TestCase @response = ActionController::TestResponse.new end - # Replace this with your real tests. - def test_truth - assert true + should 'list products of enterprise' do + ent = Enterprise.create!(:identifier => 'test_enterprise1', :name => 'Test enteprise1') + get :index, :profile => ent.identifier + assert_tag :tag => 'h2', :content => /Catalog/ end + + should 'show product of enterprise' do + ent = Enterprise.create!(:identifier => 'test_enterprise1', :name => 'Test enteprise1') + prod = ent.products.create!(:name => 'Product test') + get :show, :id => prod.id, :profile => ent.identifier + assert_tag :tag => 'h2', :content => /#{prod.name}/ + end + end -- libgit2 0.21.2