Commit 97e657dab36c5b947d7913dfd48636ade5ab66d8
1 parent
85cd639c
Exists in
master
and in
22 other branches
organizations: remove mistaken enabled? method
Showing
2 changed files
with
3 additions
and
11 deletions
Show diff stats
app/models/profile.rb
| @@ -961,19 +961,11 @@ private :generate_url, :url_options | @@ -961,19 +961,11 @@ private :generate_url, :url_options | ||
| 961 | self.save | 961 | self.save |
| 962 | end | 962 | end |
| 963 | 963 | ||
| 964 | - def disabled? | ||
| 965 | - !visible | ||
| 966 | - end | ||
| 967 | - | ||
| 968 | def enable | 964 | def enable |
| 969 | self.visible = true | 965 | self.visible = true |
| 970 | self.save | 966 | self.save |
| 971 | end | 967 | end |
| 972 | 968 | ||
| 973 | - def enabled? | ||
| 974 | - visible | ||
| 975 | - end | ||
| 976 | - | ||
| 977 | def control_panel_settings_button | 969 | def control_panel_settings_button |
| 978 | {:title => _('Edit Profile'), :icon => 'edit-profile'} | 970 | {:title => _('Edit Profile'), :icon => 'edit-profile'} |
| 979 | end | 971 | end |
test/functional/organizations_controller_test.rb
| @@ -91,17 +91,17 @@ class OrganizationsControllerTest < ActionController::TestCase | @@ -91,17 +91,17 @@ class OrganizationsControllerTest < ActionController::TestCase | ||
| 91 | get :activate, {:id => organization.id} | 91 | get :activate, {:id => organization.id} |
| 92 | organization.reload | 92 | organization.reload |
| 93 | 93 | ||
| 94 | - assert organization.enabled? | 94 | + assert organization.visible |
| 95 | end | 95 | end |
| 96 | 96 | ||
| 97 | should 'deactivate organization profile' do | 97 | should 'deactivate organization profile' do |
| 98 | organization = fast_create(Organization, :visible => true, :environment_id => environment.id) | 98 | organization = fast_create(Organization, :visible => true, :environment_id => environment.id) |
| 99 | - assert organization.enabled? | 99 | + assert organization.visible |
| 100 | 100 | ||
| 101 | get :deactivate, {:id => organization.id} | 101 | get :deactivate, {:id => organization.id} |
| 102 | organization.reload | 102 | organization.reload |
| 103 | 103 | ||
| 104 | - assert organization.disabled? | 104 | + assert !organization.visible |
| 105 | end | 105 | end |
| 106 | 106 | ||
| 107 | should 'destroy organization profile' do | 107 | should 'destroy organization profile' do |