Commit 90e5609990afb3e0daf38cfe2eade26757f21b98
1 parent
e791cace
Exists in
master
and in
29 other branches
Fixed identation and removed whitespaces
Showing
2 changed files
with
13 additions
and
14 deletions
Show diff stats
app/views/account/login_block.rhtml
... | ... | @@ -9,14 +9,13 @@ |
9 | 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 | 20 | <% button_bar do %> |
22 | 21 | <%= submit_button( 'login', _('Log in') )%> | ... | ... |
test/functional/account_controller_test.rb
... | ... | @@ -24,11 +24,11 @@ class AccountControllerTest < ActionController::TestCase |
24 | 24 | def test_local_files_reference |
25 | 25 | assert_local_files_reference |
26 | 26 | end |
27 | - | |
27 | + | |
28 | 28 | def test_valid_xhtml |
29 | 29 | assert_valid_xhtml |
30 | 30 | end |
31 | - | |
31 | + | |
32 | 32 | def test_should_login_and_redirect |
33 | 33 | post :login, :user => {:login => 'johndoe', :password => 'test'} |
34 | 34 | assert session[:user] |
... | ... | @@ -110,7 +110,7 @@ class AccountControllerTest < ActionController::TestCase |
110 | 110 | |
111 | 111 | def test_shoud_save_with_acceptance_of_terms_of_use_on_signup |
112 | 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 | 114 | new_user(:terms_accepted => '1') |
115 | 115 | assert_response :success |
116 | 116 | assert_not_nil assigns(:register_pending) |
... | ... | @@ -134,7 +134,7 @@ class AccountControllerTest < ActionController::TestCase |
134 | 134 | post :login, :user => {:login => 'johndoe', :password => 'test'}, :remember_me => "0" |
135 | 135 | assert_nil @response.cookies["auth_token"] |
136 | 136 | end |
137 | - | |
137 | + | |
138 | 138 | def test_should_delete_token_on_logout |
139 | 139 | login_as :johndoe |
140 | 140 | get :logout |
... | ... | @@ -334,7 +334,7 @@ class AccountControllerTest < ActionController::TestCase |
334 | 334 | login_as(person.identifier) |
335 | 335 | |
336 | 336 | ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent') |
337 | - | |
337 | + | |
338 | 338 | task = mock |
339 | 339 | task.expects(:enterprise).returns(ent).at_least_once |
340 | 340 | EnterpriseActivation.expects(:find_by_code).with('0123456789').returns(task).at_least_once |
... | ... | @@ -349,7 +349,7 @@ class AccountControllerTest < ActionController::TestCase |
349 | 349 | login_as(person.identifier) |
350 | 350 | |
351 | 351 | ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent', :enabled => false) |
352 | - | |
352 | + | |
353 | 353 | task = mock |
354 | 354 | task.expects(:enterprise).returns(ent).at_least_once |
355 | 355 | EnterpriseActivation.expects(:find_by_code).with('0123456789').returns(task).at_least_once |
... | ... | @@ -545,7 +545,7 @@ class AccountControllerTest < ActionController::TestCase |
545 | 545 | login_as(person.identifier) |
546 | 546 | |
547 | 547 | env = Environment.default |
548 | - env.terms_of_use = 'some terms' | |
548 | + env.terms_of_use = 'some terms' | |
549 | 549 | env.save! |
550 | 550 | ent = fast_create(Enterprise, :name => 'test enterprise', :identifier => 'test_ent', :enabled => false) |
551 | 551 | ent.update_attribute(:foundation_year, 1998) |
... | ... | @@ -772,7 +772,7 @@ class AccountControllerTest < ActionController::TestCase |
772 | 772 | end |
773 | 773 | end |
774 | 774 | Environment.default.enable_plugin(Plugin1.name) |
775 | - | |
775 | + | |
776 | 776 | post :login, :user => {:login => "testuser"} |
777 | 777 | |
778 | 778 | assert_equal 'testuser', assigns(:current_user).login |
... | ... | @@ -834,7 +834,7 @@ class AccountControllerTest < ActionController::TestCase |
834 | 834 | #Redirect on get action |
835 | 835 | get :forgot_password |
836 | 836 | assert_response :redirect |
837 | - | |
837 | + | |
838 | 838 | #Redirect on post action |
839 | 839 | post :forgot_password, :change_password => { :login => 'test', :email => 'test@localhost.localdomain' } |
840 | 840 | assert_response :redirect | ... | ... |