Commit 59d132f89ba26037b620069c61ba186f477f702a
1 parent
9f22ba3e
Exists in
master
and in
29 other branches
Remove disabled enterprise message
(ActionItem3129)
Showing
4 changed files
with
2 additions
and
40 deletions
Show diff stats
app/views/content_viewer/view_page.rhtml
app/views/profile/index.rhtml
app/views/shared/_disabled_enterprise.rhtml
... | ... | @@ -1,10 +0,0 @@ |
1 | -<% if profile.enterprise? && !profile.enabled? && !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %> | |
2 | - <div id='profile-disabled'> | |
3 | - <%= environment.message_for_disabled_enterprise %> | |
4 | - <% if profile.blocked? && user && user.is_admin?(profile.environment) %> | |
5 | - <div class='unlock-button'> | |
6 | - <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %> | |
7 | - </div> | |
8 | - <% end %> | |
9 | - </div> | |
10 | -<% end %> |
test/functional/profile_controller_test.rb
... | ... | @@ -230,30 +230,6 @@ class ProfileControllerTest < ActionController::TestCase |
230 | 230 | assert_no_match /Add friend/, @response.body |
231 | 231 | end |
232 | 232 | |
233 | - should 'show message for disabled enterprise' do | |
234 | - login_as(@profile.identifier) | |
235 | - ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise', :enabled => false) | |
236 | - get :index, :profile => ent.identifier | |
237 | - assert_tag :tag => 'div', :attributes => { :id => 'profile-disabled' }, :content => /#{Environment.default.message_for_disabled_enterprise}/ | |
238 | - end | |
239 | - | |
240 | - should 'not show message for disabled enterprise to non-enterprises' do | |
241 | - login_as(@profile.identifier) | |
242 | - @profile.enabled = false; @profile.save! | |
243 | - get :index, :profile => @profile.identifier | |
244 | - assert_no_tag :tag => 'div', :attributes => { :id => 'profile-disabled' }, :content => Environment.default.message_for_disabled_enterprise | |
245 | - end | |
246 | - | |
247 | - should 'not show message for disabled enterprise if there is a block for it' do | |
248 | - login_as(@profile.identifier) | |
249 | - ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise', :enabled => false) | |
250 | - ent.boxes << Box.new | |
251 | - ent.boxes[0].blocks << DisabledEnterpriseMessageBlock.new | |
252 | - ent.save | |
253 | - get :index, :profile => ent.identifier | |
254 | - assert_no_tag :tag => 'div', :attributes => {:class => 'blocks'}, :descendant => { :tag => 'div', :attributes => { :id => 'profile-disabled' }} | |
255 | - end | |
256 | - | |
257 | 233 | should 'display "Products" link for enterprise' do |
258 | 234 | ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise', :enabled => false) |
259 | 235 | |
... | ... | @@ -1189,7 +1165,7 @@ class ProfileControllerTest < ActionController::TestCase |
1189 | 1165 | 20.times {comment = fast_create(Comment, :source_id => article, :title => 'a comment', :body => 'lalala', :created_at => Time.now)} |
1190 | 1166 | article.reload |
1191 | 1167 | get :index, :profile => profile.identifier |
1192 | - assert_tag 'ul', :attributes => {:class => 'profile-wall-activities-comments'}, :children => {:count => 0 } | |
1168 | + assert_tag 'ul', :attributes => {:class => 'profile-wall-activities-comments'}, :children => {:count => 0 } | |
1193 | 1169 | end |
1194 | 1170 | |
1195 | 1171 | should "view more comments paginated" do |
... | ... | @@ -1215,7 +1191,7 @@ class ProfileControllerTest < ActionController::TestCase |
1215 | 1191 | 20.times {fast_create(Scrap, :sender_id => profile.id, :receiver_id => profile.id, :scrap_id => scrap.id)} |
1216 | 1192 | profile.reload |
1217 | 1193 | get :index, :profile => profile.identifier |
1218 | - assert_tag 'ul', :attributes => {:class => 'profile-wall-activities-comments scrap-replies'}, :children => {:count => 0 } | |
1194 | + assert_tag 'ul', :attributes => {:class => 'profile-wall-activities-comments scrap-replies'}, :children => {:count => 0 } | |
1219 | 1195 | end |
1220 | 1196 | |
1221 | 1197 | should "view more replies paginated" do | ... | ... |