Commit c2c7c3db73265a09cf4978edc43807e13ab29d19
1 parent
012be24d
Exists in
master
and in
28 other branches
ActionItem6: affiliation relation moved from person-profile to person-organization
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@316 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
1 additions
and
7 deletions
Show diff stats
app/models/profile.rb
@@ -23,8 +23,6 @@ class Profile < ActiveRecord::Base | @@ -23,8 +23,6 @@ class Profile < ActiveRecord::Base | ||
23 | community | 23 | community |
24 | ] | 24 | ] |
25 | 25 | ||
26 | - has_many :affiliations | ||
27 | - has_many :people, :through => :affiliations | ||
28 | has_many :domains, :as => :owner | 26 | has_many :domains, :as => :owner |
29 | belongs_to :virtual_community | 27 | belongs_to :virtual_community |
30 | 28 |
test/unit/person_test.rb
@@ -3,12 +3,8 @@ require File.dirname(__FILE__) + '/../test_helper' | @@ -3,12 +3,8 @@ require File.dirname(__FILE__) + '/../test_helper' | ||
3 | class PersonTest < Test::Unit::TestCase | 3 | class PersonTest < Test::Unit::TestCase |
4 | fixtures :profiles, :users | 4 | fixtures :profiles, :users |
5 | 5 | ||
6 | - # Replace this with your real tests. | ||
7 | - def test_truth | ||
8 | - assert true | ||
9 | - end | ||
10 | - | ||
11 | def test_can_have_user | 6 | def test_can_have_user |
7 | + p = Person.new(:name => 'John', :identfier => 'john') | ||
12 | p = profiles(:johndoe) | 8 | p = profiles(:johndoe) |
13 | assert_kind_of User, p.user | 9 | assert_kind_of User, p.user |
14 | end | 10 | end |