Validate Web address
When changing the address of an existing Web (or creating a new one), check that the new name is valid. (Reported by Richard Marquez.)
This commit is contained in:
parent
844ce0ed40
commit
c010e6b7a4
2 changed files with 17 additions and 2 deletions
|
@ -56,6 +56,16 @@ class WebTest < ActiveSupport::TestCase
|
|||
assert_raises(Instiki::ValidationError) {
|
||||
Web.create(:name => 'Wiki2', :address => "wiki\234", :password => '123')
|
||||
}
|
||||
assert_raises(Instiki::ValidationError) {
|
||||
Web.create(:name => 'Wiki2', :address => "web_list", :password => '123')
|
||||
}
|
||||
assert_raises(Instiki::ValidationError) {
|
||||
Web.create(:name => 'Wiki2', :address => "", :password => '123')
|
||||
}
|
||||
assert_raises(Instiki::ValidationError) {
|
||||
Web.create!(:name => 'Wiki2', :address => "", :password => '123')
|
||||
Web.create(:name => 'Wiki2', :address => "", :password => '123')
|
||||
}
|
||||
end
|
||||
|
||||
def test_new_page_linked_from_mother_page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue