Commit b92e70d43f6442f1aab5a22a1f3b311f961598d3
1 parent
7dd68d38
Exists in
master
and in
28 other branches
ActionItem0: making tests pass
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@304 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
16 additions
and
16 deletions
Show diff stats
test/functional/application_controller_test.rb
@@ -6,7 +6,7 @@ class TestController; def rescue_action(e) raise e end; end | @@ -6,7 +6,7 @@ class TestController; def rescue_action(e) raise e end; end | ||
6 | 6 | ||
7 | class ApplicationControllerTest < Test::Unit::TestCase | 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 | def setup | 11 | def setup |
12 | @controller = TestController.new | 12 | @controller = TestController.new |
test/integration/login_to_the_application_test.rb
@@ -5,27 +5,27 @@ class LoginToTheApplicationTest < ActionController::IntegrationTest | @@ -5,27 +5,27 @@ 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 => '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 | get '/account/login' | 12 | get '/account/login' |
13 | assert_response :success | 13 | assert_response :success |
14 | 14 | ||
15 | login('ze', 'test') | 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 | end | 20 | end |
21 | 21 | ||
22 | def test_logged_in_does_not_see_login_box | 22 | def test_logged_in_does_not_see_login_box |
23 | login('ze', 'test') | 23 | login('ze', 'test') |
24 | get '/' | 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 | end | 29 | end |
30 | 30 | ||
31 | end | 31 | end |
test/integration/user_registers_at_the_application_test.rb
@@ -6,7 +6,7 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest | @@ -6,7 +6,7 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest | ||
6 | # Replace this with your real tests. | 6 | # Replace this with your real tests. |
7 | def test_successfull_registration | 7 | def test_successfull_registration |
8 | get '/' | 8 | get '/' |
9 | - assert_tag :tag => 'div', :attributes => { :id => 'register_box' } | 9 | + assert_tag :tag => 'span', :attributes => { :id => 'register_box' } |
10 | 10 | ||
11 | get '/account/signup' | 11 | get '/account/signup' |
12 | assert_response :success | 12 | assert_response :success |
@@ -17,9 +17,9 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest | @@ -17,9 +17,9 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest | ||
17 | 17 | ||
18 | # user is logged in right after the registration | 18 | # user is logged in right after the registration |
19 | follow_redirect! | 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 | end | 23 | end |
24 | 24 | ||
25 | def test_trying_an_existing_login_name | 25 | def test_trying_an_existing_login_name |
@@ -27,7 +27,7 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest | @@ -27,7 +27,7 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest | ||
27 | assert User.find_by_login('ze') # just to make sure that 'ze' already exists | 27 | assert User.find_by_login('ze') # just to make sure that 'ze' already exists |
28 | 28 | ||
29 | get '/' | 29 | get '/' |
30 | - assert_tag :tag => 'div', :attributes => { :id => 'register_box' } | 30 | + assert_tag :tag => 'span', :attributes => { :id => 'register_box' } |
31 | 31 | ||
32 | get '/account/signup' | 32 | get '/account/signup' |
33 | assert_response :success | 33 | assert_response :success |