[noosfero/noosfero][master] organizations: remove mistaken enabled? method
Rodrigo Souto
gitlab at gitlab.com
Mon Jun 8 15:58:37 BRT 2015
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
97e657da by Rodrigo Souto at 2015-06-08T15:54:52Z
organizations: remove mistaken enabled? method
- - - - -
2 changed files:
- app/models/profile.rb
- test/functional/organizations_controller_test.rb
Changes:
=====================================
app/models/profile.rb
=====================================
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -961,19 +961,11 @@ private :generate_url, :url_options
self.save
end
- def disabled?
- !visible
- end
-
def enable
self.visible = true
self.save
end
- def enabled?
- visible
- end
-
def control_panel_settings_button
{:title => _('Edit Profile'), :icon => 'edit-profile'}
end
=====================================
test/functional/organizations_controller_test.rb
=====================================
--- a/test/functional/organizations_controller_test.rb
+++ b/test/functional/organizations_controller_test.rb
@@ -91,17 +91,17 @@ class OrganizationsControllerTest < ActionController::TestCase
get :activate, {:id => organization.id}
organization.reload
- assert organization.enabled?
+ assert organization.visible
end
should 'deactivate organization profile' do
organization = fast_create(Organization, :visible => true, :environment_id => environment.id)
- assert organization.enabled?
+ assert organization.visible
get :deactivate, {:id => organization.id}
organization.reload
- assert organization.disabled?
+ assert !organization.visible
end
should 'destroy organization profile' do
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/97e657dab36c5b947d7913dfd48636ade5ab66d8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150608/b806dfd0/attachment-0001.html>
More information about the Noosfero-dev
mailing list