Commit 5e4319137f199e2aa773a020c9c8dbecd88d4402

Authored by Rodrigo Souto
1 parent 54db2305

Fixing tests for disabled enterprise message changing

test/functional/profile_controller_test.rb
... ... @@ -234,7 +234,7 @@ class ProfileControllerTest < ActionController::TestCase
234 234 login_as(@profile.identifier)
235 235 ent = fast_create(Enterprise, :name => 'my test enterprise', :identifier => 'my-test-enterprise', :enabled => false)
236 236 get :index, :profile => ent.identifier
237   - assert_tag :tag => 'div', :attributes => { :id => 'profile-disabled' }, :content => Environment.default.message_for_disabled_enterprise
  237 + assert_tag :tag => 'div', :attributes => { :id => 'profile-disabled' }, :content => /#{Environment.default.message_for_disabled_enterprise}/
238 238 end
239 239  
240 240 should 'not show message for disabled enterprise to non-enterprises' do
... ...
test/unit/disabled_enterprise_message_block_test.rb
... ... @@ -18,17 +18,6 @@ class DisabledEnterpriseMessageBlockTest < ActiveSupport::TestCase
18 18 instance_eval(&block.content)
19 19 end
20 20  
21   - should 'display nothing if environment has no message' do
22   - e = fast_create(Environment)
23   - block = DisabledEnterpriseMessageBlock.new
24   - p = Profile.new
25   - block.expects(:owner).returns(p)
26   - p.expects(:environment).returns(e)
27   -
28   - expects(:render).with(:file => 'blocks/disabled_enterprise_message', :locals => { :message => ''})
29   - instance_eval(&block.content)
30   - end
31   -
32 21 should 'not be editable' do
33 22 assert !DisabledEnterpriseMessageBlock.new.editable?
34 23 end
... ...