Commit 3d4039f4225f2514295c7098ec0fbcbaabf92ef1

Authored by Antonio Terceiro
1 parent 9b610aac

ActionItem980: no enterprise registration for now

app/views/memberships/index.rhtml
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 4
5 <% button_bar do %> 5 <% button_bar do %>
6 <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community') %> 6 <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community') %>
7 - <%= button(:add, __('Register a new Enterprise'), :controller => 'enterprise_registration') if environment.regions.any?{|i| i.has_validator?} %>  
8 <%= button :back, _('Go back'), :controller => 'profile_editor' %> 7 <%= button :back, _('Go back'), :controller => 'profile_editor' %>
9 <% end %> 8 <% end %>
10 9
test/functional/memberships_controller_test.rb
@@ -134,18 +134,6 @@ class MembershipsControllerTest &lt; Test::Unit::TestCase @@ -134,18 +134,6 @@ class MembershipsControllerTest &lt; Test::Unit::TestCase
134 assert_tag :tag => 'a', :attributes => { :href => "/myprofile/testuser/memberships/new_community" } 134 assert_tag :tag => 'a', :attributes => { :href => "/myprofile/testuser/memberships/new_community" }
135 end 135 end
136 136
137 - should 'not display link to register new enterprise if there is no validators' do  
138 - get :index, :profile => 'testuser'  
139 - assert_no_tag :tag => 'a', :content => 'Register a new Enterprise'  
140 - end  
141 -  
142 - should 'display link to register new enterprise' do  
143 - reg = Environment.default.regions.create!(:name => 'Region test')  
144 - reg.validators.create!(:name => 'Validator test', :identifier => 'validator-test')  
145 - get :index, :profile => 'testuser'  
146 - assert_tag :tag => 'a', :content => 'Register a new Enterprise'  
147 - end  
148 -  
149 should 'render destroy_community template' do 137 should 'render destroy_community template' do
150 community = Community.create!(:name => 'A community to destroy') 138 community = Community.create!(:name => 'A community to destroy')
151 get :destroy_community, :profile => 'testuser', :id => community.id 139 get :destroy_community, :profile => 'testuser', :id => community.id