summaryrefslogtreecommitdiff
path: root/test/rss/test_maker_2.0.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rss/test_maker_2.0.rb')
-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 6321ea5dce..d4d9832373 100644
--- a/test/rss/test_maker_2.0.rb
+++ b/test/rss/test_maker_2.0.rb
@@ -488,6 +488,26 @@ module RSS
assert_equal(content, guid.content)
end
+ def test_guid_permanent_link
+ 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 = true
+ assert_equal(true, guid.permanent_link?)
+ assert_equal(guid.isPermaLink, guid.permanent_link?)
+ guid.content = content
+ end
+ guid = rss.channel.items.last.guid
+ assert_equal(true, guid.isPermaLink)
+ assert_equal(content, guid.content)
+ end
+
def test_not_valid_guid
content = "http://inessential.com/2002/09/01.php#a2"