Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 24
- Log:
Initial import of Collaboa 0.5.6 from downloaded Tarball. Collaboa is
a Ruby On Rails based bug tracker and SVN repository browsing tool.
- Author:
- adh
- Date:
- Mon Jul 24 21:54:39 +0100 2006
- Size:
- 1167 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | require 'login_controller' |
3 | |
4 | # Raise errors beyond the default web-based presentation |
5 | class LoginController; def rescue_action(e) raise e end; end |
6 | |
7 | class LoginControllerTest < Test::Unit::TestCase |
8 | |
9 | fixtures :users |
10 | |
11 | def setup |
12 | @controller = LoginController.new |
13 | @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new |
14 | @request.host = "localhost" |
15 | end |
16 | |
17 | def test_auth_bob |
18 | @request.session[:return_to] = "/bogus/location" |
19 | |
20 | post :login, "user_login" => "bob", "user_password" => "test" |
21 | assert_session_has :user_id |
22 | |
23 | assert_equal users(:bob).id, @response.session[:user_id] |
24 | |
25 | assert_redirect_url "http://localhost/bogus/location" |
26 | end |
27 | |
28 | def test_invalid_login |
29 | post :login, "user_login" => "bob", "user_password" => "not_correct" |
30 | |
31 | assert_session_has_no :user_id |
32 | |
33 | assert_template_has "message" |
34 | assert_template_has "login" |
35 | end |
36 | |
37 | def test_login_logoff |
38 | |
39 | post :login, "user_login" => "bob", "user_password" => "test" |
40 | assert_session_has :user_id |
41 | |
42 | get :logout |
43 | assert_session_has_no :user |
44 | |
45 | end |
46 | |
47 | end |