diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-22 16:03:57 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-22 16:03:57 +0000 |
commit | 5e648821233fa9aedeeb50e7c6c048550860298d (patch) | |
tree | 02fa443fef401cd141410133be83e22be20547bc /test/rss | |
parent | 588ac3ee1fd23690e2da36986f736aac12bec589 (diff) | |
download | ruby-5e648821233fa9aedeeb50e7c6c048550860298d.tar.gz |
rss itunes: fix a bug that <itunes:explicit> value isn't fully supported
Fix GH-1725
<itunes:explicit> accepts "explicit", "yes", "true", "clean", "no" and
"false" as valid values.
Here is the <itunes:explicit>'s description in
https://help.apple.com/itc/podcasts_connect/#/itcb54353390:
> The <itunes:explicit> tag indicates whether your podcast contains
> explicit material. You can specify the following values:
>
> * Yes | Explicit | True. If you specify yes, explicit, or true,
> indicating the presence of explicit content, the iTunes Store
> displays an Explicit parental advisory graphic for your podcast.
>
> * Clean | No | False. If you specify clean, no, or false, indicating
> that none of your podcast episodes contain explicit language or
> adult content, the iTunes Store displays a Clean parental
> advisory graphic for your podcast.
I don't know whether <itunes:explicit> value is case sensitive or
insensitive. But the current implementation is case insensitive.
Reported by Valerie Woolard Srinivasan. Thanks!!!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
-rw-r--r-- | test/rss/test_itunes.rb | 6 | ||||
-rw-r--r-- | test/rss/test_maker_itunes.rb | 14 |
2 files changed, 17 insertions, 3 deletions
diff --git a/test/rss/test_itunes.rb b/test/rss/test_itunes.rb index 7be001062b..456e0afb20 100644 --- a/test/rss/test_itunes.rb +++ b/test/rss/test_itunes.rb @@ -224,9 +224,13 @@ module RSS def assert_itunes_explicit(readers, &rss20_maker) _wrap_assertion do + _assert_itunes_explicit(true, "explicit", readers, &rss20_maker) _assert_itunes_explicit(true, "yes", readers, &rss20_maker) + _assert_itunes_explicit(true, "true", readers, &rss20_maker) _assert_itunes_explicit(false, "clean", readers, &rss20_maker) - _assert_itunes_explicit(nil, "no", readers, &rss20_maker) + _assert_itunes_explicit(false, "no", readers, &rss20_maker) + _assert_itunes_explicit(false, "false", readers, &rss20_maker) + _assert_itunes_explicit(nil, "invalid", readers, &rss20_maker) end end diff --git a/test/rss/test_maker_itunes.rb b/test/rss/test_maker_itunes.rb index 03092b1c41..5b435f5aec 100644 --- a/test/rss/test_maker_itunes.rb +++ b/test/rss/test_maker_itunes.rb @@ -279,10 +279,20 @@ module RSS def assert_maker_itunes_explicit(maker_readers, feed_readers=nil) _wrap_assertion do feed_readers ||= maker_readers - _assert_maker_itunes_explicit(true, "yes", maker_readers, feed_readers) + _assert_maker_itunes_explicit(true, "explicit", + maker_readers, feed_readers) + _assert_maker_itunes_explicit(true, "yes", + maker_readers, feed_readers) + _assert_maker_itunes_explicit(true, "true", + maker_readers, feed_readers) _assert_maker_itunes_explicit(false, "clean", maker_readers, feed_readers) - _assert_maker_itunes_explicit(nil, "no", maker_readers, feed_readers) + _assert_maker_itunes_explicit(false, "no", + maker_readers, feed_readers) + _assert_maker_itunes_explicit(false, "false", + maker_readers, feed_readers) + _assert_maker_itunes_explicit(nil, "invalid", + maker_readers, feed_readers) end end |