Commit 6b82fa474f54a162fca85d8c118ee305b85c3351

Authored by AntonioTerceiro
1 parent e12f7558

ActionItem93: fixing login test



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@996 3f533792-8f58-4932-b0fe-aaf55b0a4547
test/integration/login_to_the_application_test.rb
@@ -5,27 +5,16 @@ class LoginToTheApplicationTest < ActionController::IntegrationTest @@ -5,27 +5,16 @@ class LoginToTheApplicationTest < ActionController::IntegrationTest
5 5
6 def test_anonymous_user_logins_to_application 6 def test_anonymous_user_logins_to_application
7 get '/' 7 get '/'
8 - assert_tag :tag => 'span', :attributes => { :id => 'login_box' }  
9 - assert_no_tag :tag => 'span', :attributes => { :id => 'user_links' }  
10 - assert_no_tag :tag => 'span', :attributes => { :id => 'logout_box' } 8 + assert_tag :tag => 'a', :attributes => { :href => '/account/login' }
  9 + assert_no_tag :tag => 'a', :attributes => { :href => '/account/logout' }
11 10
12 get '/account/login' 11 get '/account/login'
13 assert_response :success 12 assert_response :success
14 13
15 login('ze', 'test') 14 login('ze', 'test')
  15 + assert_no_tag :tag => 'a', :attributes => { :href => '/account/login' }
  16 + assert_tag :tag => 'a', :attributes => { :href => '/account/logout' }
16 17
17 - assert_no_tag :tag => 'span', :attributes => { :id => 'login_box' }  
18 - assert_tag :tag => 'span', :attributes => { :id => 'user_links' }  
19 - assert_tag :tag => 'span', :attributes => { :id => 'logout_box' }  
20 - end  
21 -  
22 - def test_logged_in_does_not_see_login_box  
23 - login('ze', 'test')  
24 - get '/'  
25 - assert_no_tag :tag => 'span', :attributes => { :id => 'login_box' }  
26 - assert_no_tag :tag => 'span', :attributes => { :id => 'register_box' }  
27 - assert_tag :tag => 'span', :attributes => { :id => 'user_links' }  
28 - assert_tag :tag => 'span', :attributes => { :id => 'logout_box' }  
29 end 18 end
30 19
31 end 20 end