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 | 961 | self.save |
| 962 | 962 | end |
| 963 | 963 | |
| 964 | - def disabled? | |
| 965 | - !visible | |
| 966 | - end | |
| 967 | - | |
| 968 | 964 | def enable |
| 969 | 965 | self.visible = true |
| 970 | 966 | self.save |
| 971 | 967 | end |
| 972 | 968 | |
| 973 | - def enabled? | |
| 974 | - visible | |
| 975 | - end | |
| 976 | - | |
| 977 | 969 | def control_panel_settings_button |
| 978 | 970 | {:title => _('Edit Profile'), :icon => 'edit-profile'} |
| 979 | 971 | end | ... | ... |
test/functional/organizations_controller_test.rb
| ... | ... | @@ -91,17 +91,17 @@ class OrganizationsControllerTest < ActionController::TestCase |
| 91 | 91 | get :activate, {:id => organization.id} |
| 92 | 92 | organization.reload |
| 93 | 93 | |
| 94 | - assert organization.enabled? | |
| 94 | + assert organization.visible | |
| 95 | 95 | end |
| 96 | 96 | |
| 97 | 97 | should 'deactivate organization profile' do |
| 98 | 98 | organization = fast_create(Organization, :visible => true, :environment_id => environment.id) |
| 99 | - assert organization.enabled? | |
| 99 | + assert organization.visible | |
| 100 | 100 | |
| 101 | 101 | get :deactivate, {:id => organization.id} |
| 102 | 102 | organization.reload |
| 103 | 103 | |
| 104 | - assert organization.disabled? | |
| 104 | + assert !organization.visible | |
| 105 | 105 | end |
| 106 | 106 | |
| 107 | 107 | should 'destroy organization profile' do | ... | ... |