Prohibit invalid URI characters in web names (JavaScript normally prevents from it, but it may be disabled)
This commit is contained in:
parent
759fbda8a0
commit
d330c02186
3 changed files with 19 additions and 2 deletions
|
@ -2,6 +2,7 @@ ENV['RAILS_ENV'] = 'test'
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
|
||||
require 'application'
|
||||
require 'test/unit'
|
||||
require 'breakpoint'
|
||||
require 'action_controller/test_process'
|
||||
|
||||
# Uncomment this variable to have assert_success check that response bodies are valid XML
|
||||
|
|
|
@ -119,6 +119,12 @@ class WebTest < Test::Unit::TestCase
|
|||
assert_equal 100, web.max_upload_size
|
||||
end
|
||||
|
||||
def test_initialize_invalid_name
|
||||
wiki_stub = Object.new
|
||||
assert_raises(Instiki::ValidationError) {
|
||||
Web.new(wiki_stub, 'Wiki2', "wiki\234", '123')
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue