From 6b82fa474f54a162fca85d8c118ee305b85c3351 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 1 Dec 2007 13:28:53 +0000 Subject: [PATCH] ActionItem93: fixing login test --- test/integration/login_to_the_application_test.rb | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/test/integration/login_to_the_application_test.rb b/test/integration/login_to_the_application_test.rb index ef76c62..cc043ef 100644 --- a/test/integration/login_to_the_application_test.rb +++ b/test/integration/login_to_the_application_test.rb @@ -5,27 +5,16 @@ class LoginToTheApplicationTest < ActionController::IntegrationTest def test_anonymous_user_logins_to_application get '/' - assert_tag :tag => 'span', :attributes => { :id => 'login_box' } - assert_no_tag :tag => 'span', :attributes => { :id => 'user_links' } - assert_no_tag :tag => 'span', :attributes => { :id => 'logout_box' } + assert_tag :tag => 'a', :attributes => { :href => '/account/login' } + assert_no_tag :tag => 'a', :attributes => { :href => '/account/logout' } get '/account/login' assert_response :success login('ze', 'test') + assert_no_tag :tag => 'a', :attributes => { :href => '/account/login' } + assert_tag :tag => 'a', :attributes => { :href => '/account/logout' } - assert_no_tag :tag => 'span', :attributes => { :id => 'login_box' } - assert_tag :tag => 'span', :attributes => { :id => 'user_links' } - assert_tag :tag => 'span', :attributes => { :id => 'logout_box' } - end - - def test_logged_in_does_not_see_login_box - login('ze', 'test') - get '/' - assert_no_tag :tag => 'span', :attributes => { :id => 'login_box' } - assert_no_tag :tag => 'span', :attributes => { :id => 'register_box' } - assert_tag :tag => 'span', :attributes => { :id => 'user_links' } - assert_tag :tag => 'span', :attributes => { :id => 'logout_box' } end end -- libgit2 0.21.2