Commit f84cb4a6cecfa5861908da8747dfb3c8d7d3832d

Authored by AntonioTerceiro
1 parent e5456c5e

ActionItem44: adjusting test


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2000 3f533792-8f58-4932-b0fe-aaf55b0a4547
test/functional/profile_editor_controller_test.rb
@@ -342,20 +342,20 @@ class ProfileEditorControllerTest < Test::Unit::TestCase @@ -342,20 +342,20 @@ class ProfileEditorControllerTest < Test::Unit::TestCase
342 end 342 end
343 343
344 should 'link to mailconf' do 344 should 'link to mailconf' do
345 - MailConf.expects(:enabled?).returns(true) 345 + MailConf.expects(:enabled?).returns(true).at_least_once
346 get :index, :profile => 'ze' 346 get :index, :profile => 'ze'
347 assert_tag :tag => 'a', :attributes => { :href => '/myprofile/ze/mailconf' } 347 assert_tag :tag => 'a', :attributes => { :href => '/myprofile/ze/mailconf' }
348 end 348 end
349 349
350 should 'not link to mailconf for organizations' do 350 should 'not link to mailconf for organizations' do
351 - MailConf.stubs(:enabled?).returns(true) 351 + MailConf.stubs(:enabled?).returns(true).at_least_once
352 org = Organization.create!(:name => 'test org', :identifier => 'testorg', :contact_person => 'my contact') 352 org = Organization.create!(:name => 'test org', :identifier => 'testorg', :contact_person => 'my contact')
353 get :index, :profile => 'testorg' 353 get :index, :profile => 'testorg'
354 assert_no_tag :tag => 'a', :attributes => { :href => '/myprofile/testorg/mailconf' } 354 assert_no_tag :tag => 'a', :attributes => { :href => '/myprofile/testorg/mailconf' }
355 end 355 end
356 356
357 should 'not link to mailconf if mail not enabled' do 357 should 'not link to mailconf if mail not enabled' do
358 - MailConf.expects(:enabled?).returns(false) 358 + MailConf.expects(:enabled?).returns(false).at_least_once
359 get :index, :profile => 'ze' 359 get :index, :profile => 'ze'
360 assert_no_tag :tag => 'a', :attributes => { :href => '/myprofile/ze/mailconf' } 360 assert_no_tag :tag => 'a', :attributes => { :href => '/myprofile/ze/mailconf' }
361 end 361 end