Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Works
- def test_bad_login
- post :login, :user => { :username => users(:a).username, :password => 'invalid' }
- assert_response :success
- assert_template 'login'
- assert_not_nil flash
- end
- ## Syntax error
- def test_set_school_logged_in_no_school_id
- post :set_school, :school => { :school => 1 }, { :user_id => users(:no_school_id).id }
- breakpoint
- assert_equal assigns['user'].school_id, 1
- assert_redirected_to :controller => 'school', :action => 'view'
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement