diff --git a/app/models/organization.rb b/app/models/organization.rb
index 5afd740..be9aa4e 100644
--- a/app/models/organization.rb
+++ b/app/models/organization.rb
@@ -46,4 +46,11 @@ class Organization < Profile
organization_info
end
+ # Yes, organizations have members.
+ #
+ # Returns true.
+ def has_members?
+ true
+ end
+
end
diff --git a/app/models/profile.rb b/app/models/profile.rb
index c293874..c110fff 100644
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -221,4 +221,11 @@ class Profile < ActiveRecord::Base
articles.select {|item| item.tags.map(&:name).include?(tag) }
end
+ # Tells whether a specified profile has members or nor.
+ #
+ # On this class, returns false by default.
+ def has_members?
+ false
+ end
+
end
diff --git a/test/unit/organization_test.rb b/test/unit/organization_test.rb
index 8525181..851f82e 100644
--- a/test/unit/organization_test.rb
+++ b/test/unit/organization_test.rb
@@ -101,4 +101,8 @@ class OrganizationTest < Test::Unit::TestCase
assert profile.blocks.size > 0
end
+ should 'have members' do
+ assert_equal true, Organization.new.has_members?
+ end
+
end
diff --git a/test/unit/profile_test.rb b/test/unit/profile_test.rb
index 9c08b99..45ddd51 100644
--- a/test/unit/profile_test.rb
+++ b/test/unit/profile_test.rb
@@ -309,6 +309,10 @@ class ProfileTest < Test::Unit::TestCase
assert_kind_of Role, Profile::Roles.member
end
+ should 'not have members by default' do
+ assert_equal false, Profile.new.has_members?
+ end
+
private
def assert_invalid_identifier(id)
--
libgit2 0.21.2