Iam using Rails 4.2.5, Ive to write controller test for destroy action, but iam using ajax call to destroy and using destroy.js.erb file. Please help me to solve the following issue to pass the test when it calls js format, Iam pasting error below.
def destroy
@status = @song.destroy
respond_to do |format|
format.js
end
end
SongsControllerTest#test_should_destroy_song:
ActionController::UnknownFormat: ActionController::UnknownFormat
app/controllers/songs_controller.rb:36:in `destroy'
Aucun commentaire:
Enregistrer un commentaire