summaryrefslogtreecommitdiff
path: root/test/rss/test_accessor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rss/test_accessor.rb')
-rw-r--r--test/rss/test_accessor.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/rss/test_accessor.rb b/test/rss/test_accessor.rb
new file mode 100644
index 0000000000..08f565e596
--- /dev/null
+++ b/test/rss/test_accessor.rb
@@ -0,0 +1,26 @@
+# -*- tab-width: 2 -*- vim: ts=2
+
+require "rss-testcase"
+
+require "rss/1.0"
+require "rss/2.0"
+
+module RSS
+ class TestAccessor < TestCase
+
+ def test_date
+ channel = Rss::Channel.new
+ channel.do_validate = false
+ channel.pubDate = nil
+ assert_nil(channel.pubDate)
+
+ time = Time.now
+ channel.pubDate = time
+ assert_equal(time, channel.pubDate)
+
+ channel.pubDate = nil
+ assert_nil(channel.pubDate)
+ end
+
+ end
+end