Sha256: 74e3e83c208d3a518d1e66e572163cc4d69788bb18c6b594ee12e55521368a9c
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
require 'helper' class TopHatRobotsTestCase < Test::Unit::TestCase context "using the meta helper" do setup do @template = ActionView::Base.new end context "robots" do context "nofollow" do should "default to all robots" do assert_equal @template.nofollow, "<meta content=\"nofollow\" name=\"robots\" />" end should "use a descriptor if one is provided" do assert_equal @template.nofollow('googlebot'), "<meta content=\"nofollow\" name=\"googlebot\" />" end end context "noindex" do should "default to all robots" do assert_equal @template.noindex, "<meta content=\"noindex\" name=\"robots\" />" end should "use a descriptor if one is provided" do assert_equal @template.noindex('googlebot'), "<meta content=\"noindex\" name=\"googlebot\" />" end end context "canonical" do should "not render when not passed a path" do assert_nil @template.canonical end should "render a tag when passed a path" do assert_equal @template.canonical('http://mysite.com/somepath/'), "<link href=\"http://mysite.com/somepath/\" rel=\"canonical\" />" end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tophat-1.2.0 | test/test_robots.rb |