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.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/rss/test_accessor.rb b/test/rss/test_accessor.rb
new file mode 100644
index 0000000000..563e5eca9c
--- /dev/null
+++ b/test/rss/test_accessor.rb
@@ -0,0 +1,24 @@
+require "test/unit"
+require "rss/parser"
+require "rss/1.0"
+require "rss/2.0"
+require "test/common"
+
+class TestAccessor < Test::Unit::TestCase
+ include TestRSSMixin
+
+ 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