This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2007-09-27 02:19:14 -04:00
|
|
|
require File.dirname(__FILE__) + '/../test_helper'
|
|
|
|
|
|
|
|
class PageTest < Test::Unit::TestCase
|
|
|
|
fixtures :pages
|
|
|
|
|
|
|
|
def test_create
|
|
|
|
assert_create('Page', :title => 'my test page')
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_destroy
|
|
|
|
assert_destroy('Page')
|
|
|
|
end
|
2007-10-03 01:43:33 -04:00
|
|
|
|
|
|
|
def test_no_html_in_tag
|
|
|
|
p = Page.new :title => 'test page', :redcloth => '<ul><li>list</li></ul>'
|
|
|
|
p.save
|
|
|
|
assert p.html !~ /ul/
|
|
|
|
end
|
2007-10-03 02:34:21 -04:00
|
|
|
|
|
|
|
def test_url_titles
|
|
|
|
p = Page.new :title => 'Test Title'
|
|
|
|
assert Page.title_from_url('Test_Title') == p.title
|
|
|
|
assert p.title_for_url == 'Test_Title'
|
|
|
|
end
|
2007-09-27 02:19:14 -04:00
|
|
|
end
|