diff options
Diffstat (limited to 'test/rss/rss-assertions.rb')
-rw-r--r-- | test/rss/rss-assertions.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb index f5e8c5cca..d8e597cd5 100644 --- a/test/rss/rss-assertions.rb +++ b/test/rss/rss-assertions.rb @@ -435,6 +435,25 @@ module RSS end end + def assert_taxo_topic(topics, target) + _wrap_assertion do + topics.each_with_index do |topic, i| + taxo_topic = target.taxo_topics[i] + topic.each do |name, value| + case name + when :link + assert_equal(value, taxo_topic.about) + assert_equal(value, taxo_topic.taxo_link) + when :topics + assert_equal(value, taxo_topic.taxo_topics.resources) + else + assert_equal(value, taxo_topic.__send__("dc_#{name}")) + end + end + end + end + end + def assert_attributes(attrs, names, target) _wrap_assertion do |