##// END OF EJS Templates
Additional test for MyController....
Jean-Philippe Lang -
r9304:864054c00504
parent child
Show More
@@ -22,7 +22,7 require 'my_controller'
22 class MyController; def rescue_action(e) raise e end; end
22 class MyController; def rescue_action(e) raise e end; end
23
23
24 class MyControllerTest < ActionController::TestCase
24 class MyControllerTest < ActionController::TestCase
25 fixtures :users, :user_preferences, :roles, :projects, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields
25 fixtures :users, :user_preferences, :roles, :projects, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources
26
26
27 def setup
27 def setup
28 @controller = MyController.new
28 @controller = MyController.new
@@ -152,6 +152,14 class MyControllerTest < ActionController::TestCase
152 assert User.try_to_login('jsmith', 'hello')
152 assert User.try_to_login('jsmith', 'hello')
153 end
153 end
154
154
155 def test_change_password_should_redirect_if_user_cannot_change_its_password
156 User.find(2).update_attribute(:auth_source_id, 1)
157
158 get :password
159 assert_not_nil flash[:error]
160 assert_redirected_to '/my/account'
161 end
162
155 def test_page_layout
163 def test_page_layout
156 get :page_layout
164 get :page_layout
157 assert_response :success
165 assert_response :success
General Comments 0
You need to be logged in to leave comments. Login now