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:
- 829 Bytes
- Properties:
- Property svn:executable is set
1 | #!/bin/env ruby |
2 | |
3 | require File.dirname(__FILE__) + '/../test_helper' |
4 | |
5 | class BlockedIpTest < Test::Unit::TestCase |
6 | |
7 | def setup |
8 | BlockedIp.delete_all |
9 | end |
10 | |
11 | def test_block |
12 | BlockedIp.block('1.1.1.1') |
13 | assert_equal 1, BlockedIp.find_all.size |
14 | assert_equal '1.1.1.1', BlockedIp.find_all[0].ip |
15 | BlockedIp.block('1.1.1.1') |
16 | assert_equal 1, BlockedIp.find_all.size |
17 | |
18 | BlockedIp.block('2.2.2.2') |
19 | assert_equal 2, BlockedIp.find_all.size |
20 | assert_equal '2.2.2.2', BlockedIp.find_all[1].ip |
21 | |
22 | BlockedIp.block('1.1.1.1') |
23 | assert BlockedIp.blocked?('1.1.1.1') |
24 | assert BlockedIp.blocked?('2.2.2.2') |
25 | assert !BlockedIp.blocked?('3.3.3.3') |
26 | BlockedIp.unblock('1.1.1.1') |
27 | assert !BlockedIp.blocked?('1.1.1.1') |
28 | assert BlockedIp.blocked?('2.2.2.2') |
29 | BlockedIp.unblock('1.1.1.1') |
30 | end |
31 | end |