Commit b92e70d43f6442f1aab5a22a1f3b311f961598d3

Authored by AntonioTerceiro
1 parent 7dd68d38

ActionItem0: making tests pass



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@304 3f533792-8f58-4932-b0fe-aaf55b0a4547
test/functional/application_controller_test.rb
... ... @@ -6,7 +6,7 @@ class TestController; def rescue_action(e) raise e end; end
6 6  
7 7 class ApplicationControllerTest < Test::Unit::TestCase
8 8  
9   - fixtures :profiles, :virtual_communities, :domains, :boxes
  9 + fixtures :profiles, :virtual_communities, :domains, :design_boxes
10 10  
11 11 def setup
12 12 @controller = TestController.new
... ...
test/integration/login_to_the_application_test.rb
... ... @@ -5,27 +5,27 @@ class LoginToTheApplicationTest &lt; ActionController::IntegrationTest
5 5  
6 6 def test_anonymous_user_logins_to_application
7 7 get '/'
8   - assert_tag :tag => 'div', :attributes => { :id => 'login_box' }
9   - assert_no_tag :tag => 'div', :attributes => { :id => 'user_links' }
10   - assert_no_tag :tag => 'div', :attributes => { :id => 'logout_box' }
  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' }
11 11  
12 12 get '/account/login'
13 13 assert_response :success
14 14  
15 15 login('ze', 'test')
16 16  
17   - assert_no_tag :tag => 'div', :attributes => { :id => 'login_box' }
18   - assert_tag :tag => 'div', :attributes => { :id => 'user_links' }
19   - assert_tag :tag => 'div', :attributes => { :id => 'logout_box' }
  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 20 end
21 21  
22 22 def test_logged_in_does_not_see_login_box
23 23 login('ze', 'test')
24 24 get '/'
25   - assert_no_tag :tag => 'div', :attributes => { :id => 'login_box' }
26   - assert_no_tag :tag => 'div', :attributes => { :id => 'register_box' }
27   - assert_tag :tag => 'div', :attributes => { :id => 'user_links' }
28   - assert_tag :tag => 'div', :attributes => { :id => 'logout_box' }
  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 29 end
30 30  
31 31 end
... ...
test/integration/user_registers_at_the_application_test.rb
... ... @@ -6,7 +6,7 @@ class UserRegistersAtTheApplicationTest &lt; ActionController::IntegrationTest
6 6 # Replace this with your real tests.
7 7 def test_successfull_registration
8 8 get '/'
9   - assert_tag :tag => 'div', :attributes => { :id => 'register_box' }
  9 + assert_tag :tag => 'span', :attributes => { :id => 'register_box' }
10 10  
11 11 get '/account/signup'
12 12 assert_response :success
... ... @@ -17,9 +17,9 @@ class UserRegistersAtTheApplicationTest &lt; ActionController::IntegrationTest
17 17  
18 18 # user is logged in right after the registration
19 19 follow_redirect!
20   - assert_no_tag :tag => 'div', :attributes => { :id => 'login_box' }
21   - assert_tag :tag => 'div', :attributes => { :id => 'user_links' }
22   - assert_tag :tag => 'div', :attributes => { :id => 'logout_box' }
  20 + assert_no_tag :tag => 'span', :attributes => { :id => 'login_box' }
  21 + assert_tag :tag => 'span', :attributes => { :id => 'user_links' }
  22 + assert_tag :tag => 'span', :attributes => { :id => 'logout_box' }
23 23 end
24 24  
25 25 def test_trying_an_existing_login_name
... ... @@ -27,7 +27,7 @@ class UserRegistersAtTheApplicationTest &lt; ActionController::IntegrationTest
27 27 assert User.find_by_login('ze') # just to make sure that 'ze' already exists
28 28  
29 29 get '/'
30   - assert_tag :tag => 'div', :attributes => { :id => 'register_box' }
  30 + assert_tag :tag => 'span', :attributes => { :id => 'register_box' }
31 31  
32 32 get '/account/signup'
33 33 assert_response :success
... ...