Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 7
- Log:
Initial import of RForum 0.2 sources from a downloaded Tarball.
RForum is a Ruby On Rails based forum and mail gateway service.
- Author:
- adh
- Date:
- Sat Jul 22 18:43:13 +0100 2006
- Size:
- 1089 Bytes
- Properties:
- Property svn:executable is set
1 | #!/bin/env ruby |
2 | |
3 | require File.dirname(__FILE__) + '/../test_helper' |
4 | require 'rexml/document' |
5 | require 'forum_controller' |
6 | |
7 | # Raise errors beyond the default web-based presentation |
8 | # use ForumController as a specific implementation |
9 | class ForumController; def rescue_action(e) raise e end; end |
10 | |
11 | class ApplicationControllerTest < Test::Unit::TestCase |
12 | |
13 | def setup |
14 | setup_controller_test ForumController |
15 | setup_forum_fixture |
16 | end |
17 | |
18 | def test_setup_user_by_token_changes_token_expiry |
19 | token = User.find(1).generate_security_token |
20 | |
21 | process('index', {'key' => token, 'user_id' => 1}) |
22 | |
23 | # expiry should be reduced to the next ten minutes |
24 | assert User.find(1).token_expiry.to_i <= Time.now.to_i + 600*1000 |
25 | |
26 | # but if expiry time is already close (because it was already changed), |
27 | # it shouldn't extend it |
28 | five_minutes_from_now = Time.at(Time.now.to_i + 300*1000) |
29 | User.update(1, 'token_expiry' => five_minutes_from_now) |
30 | |
31 | process('index', {'key' => token, 'user_id' => 1}) |
32 | |
33 | assert_equal five_minutes_from_now, User.find(1).token_expiry |
34 | end |
35 | |
36 | end |
37 |