Fix #4507: Clicking "View wiki" on Artists with no wiki redirects to the posts page.

This commit is contained in:
evazion
2020-06-27 01:20:05 -05:00
parent 3a6e4732bf
commit f06e322dc0
2 changed files with 9 additions and 3 deletions

View File

@@ -34,6 +34,8 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
get posts_path, params: { tags: "bkub" }
assert_response :success
assert_select "#show-excerpt-link", count: 1, text: "Artist"
assert_select "#view-wiki-link", count: 0
assert_select "#view-artist-link", count: 1
artist.update(is_banned: true)
get posts_path, params: { tags: "bkub" }
@@ -49,6 +51,8 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
get posts_path, params: { tags: "bkub" }
assert_response :success
assert_select "#show-excerpt-link", count: 1, text: "Wiki"
assert_select "#view-wiki-link", count: 1
assert_select "#view-artist-link", count: 0
end
should "render for a tag with a wiki page" do