From c79fa28f04d247ff574708f9e2826bc1e0b08ecb Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sun, 2 Dec 2007 00:15:22 +0000 Subject: [PATCH] ActionItem93: updating integration test --- test/integration/user_registers_at_the_application_test.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/integration/user_registers_at_the_application_test.rb b/test/integration/user_registers_at_the_application_test.rb index 1c42c7a..11dc7e0 100644 --- a/test/integration/user_registers_at_the_application_test.rb +++ b/test/integration/user_registers_at_the_application_test.rb @@ -5,7 +5,10 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest def test_successfull_registration get '/' - assert_tag :tag => 'span', :attributes => { :id => 'register_box' } + assert_tag :tag => 'a', :attributes => { :href => '/account/login' } + + get '/account/login' + assert_tag :tag => 'a', :attributes => { :href => '/account/signup'} get '/account/signup' assert_response :success @@ -16,9 +19,8 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest # user is logged in right after the registration follow_redirect! - 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' } + assert_no_tag :tag => 'a', :attributes => { :href => '/account/login' } + assert_tag :tag => 'a', :attributes => { :href => '/account/logout' } end def test_trying_an_existing_login_name @@ -26,7 +28,10 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest assert User.find_by_login('ze') # just to make sure that 'ze' already exists get '/' - assert_tag :tag => 'span', :attributes => { :id => 'register_box' } + assert_tag :tag => 'a', :attributes => { :href => '/account/login'} + + get '/account/login' + assert_tag :tag => 'a', :attributes => { :href => '/account/signup'} get '/account/signup' assert_response :success -- libgit2 0.21.2