Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 171
- Log:
Initial import of Beast 0.9 from downloaded Tarball. Beast is a Ruby
On Rails based forum application. The original tarball came from the
following location:http://s3.amazonaws.com/beast-forum/beast-0.9.tar.gz
The forum post which announced this version's availability was at:
http://beast.caboo.se/forums/1/topics/446
- Author:
- rool
- Date:
- Fri Mar 02 15:51:55 +0000 2007
- Size:
- 1667 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | require 'monitorships_controller' |
3 | |
4 | # Re-raise errors caught by the controller. |
5 | class MonitorshipsController; def rescue_action(e) raise e end; end |
6 | |
7 | class MonitorshipsControllerTest < Test::Unit::TestCase |
8 | all_fixtures |
9 | def setup |
10 | @controller = MonitorshipsController.new |
11 | @request = ActionController::TestRequest.new |
12 | @response = ActionController::TestResponse.new |
13 | end |
14 | |
15 | def test_should_require_login |
16 | post :create, :forum_id => forums(:rails).id, :topic_id => topics(:pdi).id, :id => users(:aaron).id |
17 | assert_redirected_to login_path |
18 | end |
19 | |
20 | def test_should_add_monitorship |
21 | login_as :joe |
22 | assert_difference Monitorship, :count do |
23 | post :create, :forum_id => forums(:rails).id, :topic_id => topics(:pdi).id, :id => users(:joe).id |
24 | end |
25 | |
26 | assert topics(:pdi).monitors(true).include?(users(:joe)) |
27 | end |
28 | |
29 | def test_should_activate_monitorship |
30 | login_as :sam |
31 | assert_difference Monitorship, :count, 0 do |
32 | post :create, :forum_id => forums(:rails).id, :topic_id => topics(:pdi).id, :id => users(:sam).id |
33 | end |
34 | end |
35 | |
36 | def test_should_not_duplicate_monitorship |
37 | login_as :aaron |
38 | assert_difference Monitorship, :count, 0 do |
39 | post :create, :forum_id => forums(:rails).id, :topic_id => topics(:pdi).id, :id => users(:aaron).id |
40 | end |
41 | end |
42 | |
43 | def test_should_deactivate_monitorship |
44 | login_as :aaron |
45 | assert_difference Monitorship, :count, 0 do |
46 | delete :destroy, :forum_id => forums(:rails).id, :topic_id => topics(:pdi).id, :id => users(:aaron).id |
47 | end |
48 | |
49 | assert !topics(:pdi).monitors(true).include?(users(:aaron)) |
50 | end |
51 | end |