From c4e184f5d4367cd9a048bc3f9996084c57bb8a32 Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Mon, 30 Jul 2007 14:26:58 +0000 Subject: [PATCH] ActionItem6: some fixes made in the unit tests to make it work with comatose --- app/models/profile.rb | 2 -- test/functional/content_viewer_controller_test.rb | 2 +- test/unit/enterprise_test.rb | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/profile.rb b/app/models/profile.rb index fc2bda1..055cbc9 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -29,8 +29,6 @@ class Profile < ActiveRecord::Base has_many :people, :through => :affiliations has_many :domains, :as => :owner belongs_to :virtual_community - belongs_to :profile_owner, :polymorphic => true - # Sets the identifier for this profile. Raises an exception when called on a # existing profile (since profiles cannot be renamed) diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index c047f7c..77b52f1 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -6,7 +6,7 @@ class ContentViewerController; def rescue_action(e) raise e end; end class ContentViewerControllerTest < Test::Unit::TestCase - fixtures :domains, :virtual_communities, :users, :profiles + fixtures :domains, :virtual_communities, :users, :profiles, :comatose_pages def setup @controller = ContentViewerController.new diff --git a/test/unit/enterprise_test.rb b/test/unit/enterprise_test.rb index ddb80ba..1f41e63 100644 --- a/test/unit/enterprise_test.rb +++ b/test/unit/enterprise_test.rb @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/../test_helper' class EnterpriseTest < Test::Unit::TestCase - fixtures :profiles, :virtual_communities, :users + fixtures :profiles, :virtual_communities, :users, :comatose_pages def test_identifier_validation p = Enterprise.new @@ -49,7 +49,7 @@ class EnterpriseTest < Test::Unit::TestCase def test_numericality_year count = Enterprise.count - e = Enterprise.new(:identifier => 'test_numericality_year') + e = Enterprise.new(:identifier => 'test_numericality_year', :name => 'numeric_year') e.foundation_year = 'xxxx' assert ! e.save -- libgit2 0.21.2