Commit 90e5609990afb3e0daf38cfe2eade26757f21b98

Authored by Daniela Feitosa
1 parent e791cace

Fixed identation and removed whitespaces

app/views/account/login_block.rhtml
@@ -9,14 +9,13 @@ @@ -9,14 +9,13 @@
9 @user ||= User.new 9 @user ||= User.new
10 %> 10 %>
11 11
12 - <% labelled_form_for :user, @user,  
13 - :url => login_url do |f| %> 12 + <% labelled_form_for :user, @user, :url => login_url do |f| %>
14 13
15 - <%= f.text_field :login, :onchange => 'this.value = convToValidLogin( this.value )' %> 14 + <%= f.text_field :login, :onchange => 'this.value = convToValidLogin( this.value )' %>
16 15
17 - <%= f.password_field :password %> 16 + <%= f.password_field :password %>
18 17
19 - <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %> 18 + <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
20 19
21 <% button_bar do %> 20 <% button_bar do %>
22 <%= submit_button( 'login', _('Log in') )%> 21 <%= submit_button( 'login', _('Log in') )%>
test/functional/account_controller_test.rb
@@ -24,11 +24,11 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -24,11 +24,11 @@ class AccountControllerTest &lt; ActionController::TestCase
24 def test_local_files_reference 24 def test_local_files_reference
25 assert_local_files_reference 25 assert_local_files_reference
26 end 26 end
27 - 27 +
28 def test_valid_xhtml 28 def test_valid_xhtml
29 assert_valid_xhtml 29 assert_valid_xhtml
30 end 30 end
31 - 31 +
32 def test_should_login_and_redirect 32 def test_should_login_and_redirect
33 post :login, :user => {:login => 'johndoe', :password => 'test'} 33 post :login, :user => {:login => 'johndoe', :password => 'test'}
34 assert session[:user] 34 assert session[:user]
@@ -110,7 +110,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -110,7 +110,7 @@ class AccountControllerTest &lt; ActionController::TestCase
110 110
111 def test_shoud_save_with_acceptance_of_terms_of_use_on_signup 111 def test_shoud_save_with_acceptance_of_terms_of_use_on_signup
112 assert_difference User, :count do 112 assert_difference User, :count do
113 - Environment.default.update_attributes(:terms_of_use => 'some terms ...') 113 + Environment.default.update_attributes(:terms_of_use => 'some terms ...')
114 new_user(:terms_accepted => '1') 114 new_user(:terms_accepted => '1')
115 assert_response :success 115 assert_response :success
116 assert_not_nil assigns(:register_pending) 116 assert_not_nil assigns(:register_pending)
@@ -134,7 +134,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -134,7 +134,7 @@ class AccountControllerTest &lt; ActionController::TestCase
134 post :login, :user => {:login => 'johndoe', :password => 'test'}, :remember_me => "0" 134 post :login, :user => {:login => 'johndoe', :password => 'test'}, :remember_me => "0"
135 assert_nil @response.cookies["auth_token"] 135 assert_nil @response.cookies["auth_token"]
136 end 136 end
137 - 137 +
138 def test_should_delete_token_on_logout 138 def test_should_delete_token_on_logout
139 login_as :johndoe 139 login_as :johndoe
140 get :logout 140 get :logout
@@ -334,7 +334,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -334,7 +334,7 @@ class AccountControllerTest &lt; ActionController::TestCase
334 login_as(person.identifier) 334 login_as(person.identifier)
335 335
336 ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent') 336 ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent')
337 - 337 +
338 task = mock 338 task = mock
339 task.expects(:enterprise).returns(ent).at_least_once 339 task.expects(:enterprise).returns(ent).at_least_once
340 EnterpriseActivation.expects(:find_by_code).with('0123456789').returns(task).at_least_once 340 EnterpriseActivation.expects(:find_by_code).with('0123456789').returns(task).at_least_once
@@ -349,7 +349,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -349,7 +349,7 @@ class AccountControllerTest &lt; ActionController::TestCase
349 login_as(person.identifier) 349 login_as(person.identifier)
350 350
351 ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent', :enabled => false) 351 ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent', :enabled => false)
352 - 352 +
353 task = mock 353 task = mock
354 task.expects(:enterprise).returns(ent).at_least_once 354 task.expects(:enterprise).returns(ent).at_least_once
355 EnterpriseActivation.expects(:find_by_code).with('0123456789').returns(task).at_least_once 355 EnterpriseActivation.expects(:find_by_code).with('0123456789').returns(task).at_least_once
@@ -545,7 +545,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -545,7 +545,7 @@ class AccountControllerTest &lt; ActionController::TestCase
545 login_as(person.identifier) 545 login_as(person.identifier)
546 546
547 env = Environment.default 547 env = Environment.default
548 - env.terms_of_use = 'some terms' 548 + env.terms_of_use = 'some terms'
549 env.save! 549 env.save!
550 ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent', :enabled => false) 550 ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent', :enabled => false)
551 ent.update_attribute(:foundation_year, 1998) 551 ent.update_attribute(:foundation_year, 1998)
@@ -772,7 +772,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -772,7 +772,7 @@ class AccountControllerTest &lt; ActionController::TestCase
772 end 772 end
773 end 773 end
774 Environment.default.enable_plugin(Plugin1.name) 774 Environment.default.enable_plugin(Plugin1.name)
775 - 775 +
776 post :login, :user => {:login => "testuser"} 776 post :login, :user => {:login => "testuser"}
777 777
778 assert_equal 'testuser', assigns(:current_user).login 778 assert_equal 'testuser', assigns(:current_user).login
@@ -834,7 +834,7 @@ class AccountControllerTest &lt; ActionController::TestCase @@ -834,7 +834,7 @@ class AccountControllerTest &lt; ActionController::TestCase
834 #Redirect on get action 834 #Redirect on get action
835 get :forgot_password 835 get :forgot_password
836 assert_response :redirect 836 assert_response :redirect
837 - 837 +
838 #Redirect on post action 838 #Redirect on post action
839 post :forgot_password, :change_password => { :login => 'test', :email => 'test@localhost.localdomain' } 839 post :forgot_password, :change_password => { :login => 'test', :email => 'test@localhost.localdomain' }
840 assert_response :redirect 840 assert_response :redirect