From 5e4319137f199e2aa773a020c9c8dbecd88d4402 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Tue, 8 Jan 2013 02:13:57 +0000 Subject: [PATCH] Fixing tests for disabled enterprise message changing --- test/functional/profile_controller_test.rb | 2 +- test/unit/disabled_enterprise_message_block_test.rb | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index 82710c9..3854d13 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -234,7 +234,7 @@ class ProfileControllerTest < ActionController::TestCase login_as(@profile.identifier) ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise', :enabled => false) get :index, :profile => ent.identifier - assert_tag :tag => 'div', :attributes => { :id => 'profile-disabled' }, :content => Environment.default.message_for_disabled_enterprise + assert_tag :tag => 'div', :attributes => { :id => 'profile-disabled' }, :content => /#{Environment.default.message_for_disabled_enterprise}/ end should 'not show message for disabled enterprise to non-enterprises' do diff --git a/test/unit/disabled_enterprise_message_block_test.rb b/test/unit/disabled_enterprise_message_block_test.rb index 7d3a35c..5e78621 100644 --- a/test/unit/disabled_enterprise_message_block_test.rb +++ b/test/unit/disabled_enterprise_message_block_test.rb @@ -18,17 +18,6 @@ class DisabledEnterpriseMessageBlockTest < ActiveSupport::TestCase instance_eval(&block.content) end - should 'display nothing if environment has no message' do - e = fast_create(Environment) - block = DisabledEnterpriseMessageBlock.new - p = Profile.new - block.expects(:owner).returns(p) - p.expects(:environment).returns(e) - - expects(:render).with(:file => 'blocks/disabled_enterprise_message', :locals => { :message => ''}) - instance_eval(&block.content) - end - should 'not be editable' do assert !DisabledEnterpriseMessageBlock.new.editable? end -- libgit2 0.21.2