Commit c4e184f5d4367cd9a048bc3f9996084c57bb8a32
1 parent
5ecd6274
Exists in
master
and in
28 other branches
ActionItem6: some fixes made in the unit tests to make it work with comatose
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@208 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
3 additions
and
5 deletions
Show diff stats
app/models/profile.rb
... | ... | @@ -29,8 +29,6 @@ class Profile < ActiveRecord::Base |
29 | 29 | has_many :people, :through => :affiliations |
30 | 30 | has_many :domains, :as => :owner |
31 | 31 | belongs_to :virtual_community |
32 | - belongs_to :profile_owner, :polymorphic => true | |
33 | - | |
34 | 32 | |
35 | 33 | # Sets the identifier for this profile. Raises an exception when called on a |
36 | 34 | # existing profile (since profiles cannot be renamed) | ... | ... |
test/functional/content_viewer_controller_test.rb
... | ... | @@ -6,7 +6,7 @@ class ContentViewerController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | 7 | class ContentViewerControllerTest < Test::Unit::TestCase |
8 | 8 | |
9 | - fixtures :domains, :virtual_communities, :users, :profiles | |
9 | + fixtures :domains, :virtual_communities, :users, :profiles, :comatose_pages | |
10 | 10 | |
11 | 11 | def setup |
12 | 12 | @controller = ContentViewerController.new | ... | ... |
test/unit/enterprise_test.rb
1 | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | |
3 | 3 | class EnterpriseTest < Test::Unit::TestCase |
4 | - fixtures :profiles, :virtual_communities, :users | |
4 | + fixtures :profiles, :virtual_communities, :users, :comatose_pages | |
5 | 5 | |
6 | 6 | def test_identifier_validation |
7 | 7 | p = Enterprise.new |
... | ... | @@ -49,7 +49,7 @@ class EnterpriseTest < Test::Unit::TestCase |
49 | 49 | def test_numericality_year |
50 | 50 | count = Enterprise.count |
51 | 51 | |
52 | - e = Enterprise.new(:identifier => 'test_numericality_year') | |
52 | + e = Enterprise.new(:identifier => 'test_numericality_year', :name => 'numeric_year') | |
53 | 53 | e.foundation_year = 'xxxx' |
54 | 54 | assert ! e.save |
55 | 55 | ... | ... |