tests: add more controller tests.

* Fix an exception in /artists/show_or_new.
This commit is contained in:
evazion
2020-03-31 17:46:45 -05:00
parent a272453bd0
commit e0a72ef135
9 changed files with 131 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ class ArtistsController < ApplicationController
@artist = Artist.find_by_name(params[:name])
if params[:name].blank?
redirect_to new_artist_path(artist_params(:new))
redirect_to new_artist_path(permitted_attributes(Artist))
elsif @artist.present?
redirect_to artist_path(@artist)
else