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:
- 1070 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | require 'moderators_controller' |
3 | |
4 | # Re-raise errors caught by the controller. |
5 | class ModeratorsController; def rescue_action(e) raise e end; end |
6 | |
7 | class ModeratorsControllerTest < Test::Unit::TestCase |
8 | all_fixtures |
9 | def setup |
10 | @controller = ModeratorsController.new |
11 | @request = ActionController::TestRequest.new |
12 | @response = ActionController::TestResponse.new |
13 | end |
14 | |
15 | def test_should_delete_moderatorship |
16 | assert users(:sam).moderator_of?(forums(:rails)) |
17 | login_as :aaron |
18 | assert_difference Moderatorship, :count, -1 do |
19 | delete :destroy, :user_id => users(:sam).id, :id => moderatorships(:sam_rails).id |
20 | end |
21 | assert_redirected_to user_path(users(:sam)) |
22 | assert !users(:sam).moderator_of?(forums(:rails)) |
23 | end |
24 | |
25 | def test_should_only_allow_admins_to_delete_moderatorships |
26 | login_as :sam |
27 | assert_difference Moderatorship, :count, 0 do |
28 | delete :destroy, :user_id => users(:sam).id, :id => moderatorships(:sam_rails).id |
29 | end |
30 | assert_redirected_to login_path |
31 | end |
32 | end |