summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-24 12:32:24 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-24 12:32:24 +0000
commitbcffee693893cabfffa3d4f9049c06a348b9f418 (patch)
tree02a0fe94085ff445244906ee0ba937e08ce37ca8 /test
parentb3efcdcb7a48f46a71bc2648bfdd15dbe5f65cf4 (diff)
* lib/rss/maker/base.rb, test/rss/test_maker_2.0.rb: fix a bug
that RSS Maker doesn't accept 'false' as guid's isPermaLink. Reported by Joe Holt. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/rss/test_maker_2.0.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/rss/test_maker_2.0.rb b/test/rss/test_maker_2.0.rb
index a45a086da4..3c229909fa 100644
--- a/test/rss/test_maker_2.0.rb
+++ b/test/rss/test_maker_2.0.rb
@@ -508,6 +508,26 @@ module RSS
assert_equal(content, guid.content)
end
+ def test_guid_permanent_link_false
+ content = "http://inessential.com/2002/09/01.php#a2"
+
+ rss = RSS::Maker.make("2.0") do |maker|
+ setup_dummy_channel(maker)
+ setup_dummy_item(maker)
+
+ guid = maker.items.last.guid
+ assert_equal(nil, guid.permanent_link?)
+ assert_equal(guid.isPermaLink, guid.permanent_link?)
+ guid.permanent_link = false
+ assert_equal(false, guid.permanent_link?)
+ assert_equal(guid.isPermaLink, guid.permanent_link?)
+ guid.content = content
+ end
+ guid = rss.channel.items.last.guid
+ assert_equal(false, guid.isPermaLink)
+ assert_equal(content, guid.content)
+ end
+
def test_not_valid_guid
content = "http://inessential.com/2002/09/01.php#a2"