Add show actions for note, artist, artist commentary versions.
Add these endpoints: * /note_versions/1234 * /artist_versions/1234 * /artist_commentary_versions/1234 This is so the /ip_addresses listing can link to these endpoints.
This commit is contained in:
@@ -3,10 +3,8 @@ require 'test_helper'
|
||||
class ArtistVersionsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "An artist versions controller" do
|
||||
setup do
|
||||
@user = FactoryBot.create(:gold_user)
|
||||
as_user do
|
||||
@artist = create(:artist)
|
||||
end
|
||||
@user = create(:gold_user)
|
||||
@artist = as(@user) { create(:artist) }
|
||||
end
|
||||
|
||||
should "get the index page" do
|
||||
@@ -18,5 +16,15 @@ class ArtistVersionsControllerTest < ActionDispatch::IntegrationTest
|
||||
get_auth artist_versions_path(search: {name: @artist.name}), @user
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
context "show action" do
|
||||
should "work" do
|
||||
get artist_version_path(@artist.versions.first)
|
||||
assert_redirected_to artist_versions_path(search: { artist_id: @artist.id })
|
||||
|
||||
get artist_version_path(@artist.versions.first), as: :json
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user