Blocking of file uploads by admin
This commit is contained in:
parent
6c020342a3
commit
b747b611b3
2 changed files with 23 additions and 0 deletions
|
@ -114,4 +114,14 @@ class FileControllerTest < Test::Unit::TestCase
|
|||
@home.display_content
|
||||
end
|
||||
|
||||
def test_uploads_blocking
|
||||
@web.allow_uploads = true
|
||||
r = process 'file', 'web' => 'wiki1', 'id' => 'filename'
|
||||
assert_success
|
||||
|
||||
@web.allow_uploads = false
|
||||
r = process 'file', 'web' => 'wiki1', 'id' => 'filename'
|
||||
assert_equal '403 Forbidden', r.headers['Status']
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue