Sha256: 2ac3dd5d8e977d99540743337169a95c6c016f09e12ca3f0cff836cc3cdfcd8e
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' class BlogTest < Test::Unit::TestCase fixtures :blogs, :contents, :sidebars def setup @blog = Blog.find(:first) end def test_blog_name assert_equal "test blog", @blog.blog_name end def test_default_allow_pings assert ! @blog.default_allow_pings? end def test_setting_booleans_with_integers @blog.sp_global = 1 assert @blog.sp_global @blog.sp_global = 0 assert !@blog.sp_global end def test_setting_booleans_with_strings {"0 but true" => true, "" => false, "false" => false, 1 => true, 0 => false, nil => false, 'f' => false }.each do |value, expected| @blog.sp_global = value assert_equal expected, @blog.sp_global end end def test_current_theme_path assert_equal Theme.themes_root + "/azure", @blog.current_theme.path end def test_current_theme assert_equal "azure", @blog.current_theme.name end def test_url_for assert_equal('http://myblog.net/articles/read/1', @blog.url_for(:controller => 'articles', :action => 'read', :id => 1)) end def test_blog_has_sidebars assert_equal 1, @blog.sidebars.size end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
typo-4.1.1 | test/unit/blog_test.rb |
typo-4.1 | test/unit/blog_test.rb |