Guest User

Untitled

a guest
Feb 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. require File.dirname(__FILE__) + '/../test_helper'
  2. require 'log_entry_controller'
  3.  
  4. # Re-raise errors caught by the controller.
  5. class LogEntryController; def rescue_action(e) raise e end; end
  6.  
  7. class LogEntryControllerTest < Test::Unit::TestCase
  8.  
  9. self.use_instantiated_fixtures = true
  10.  
  11. fixtures :user_units
  12. fixtures :users
  13.  
  14. def setup
  15. @controller = LogEntryController.new
  16. @request = ActionController::TestRequest.new
  17. @response = ActionController::TestResponse.new
  18.  
  19. @controller.session = {"login" => "bob"}
  20. end
  21.  
  22. # Replace this with your real tests.
  23. def test_add_setup
  24. get :add
  25. assert_response :success # NOT LOGGED IN! SO DOESN'T WORK
  26. end
  27. end
Add Comment
Please, Sign In to add comment