I have the following controller code:
def create @admin = Admin.new(params[:admin]) respond_to do |format| if @admin.save redirect_to
I had a similar error, my controller was only responding to JSON. I needed it to respond to HTML also for the tests to work (which only makes sense):
class AdsController < ApplicationController respond_to :json, :html
I received the error when trying to do: assert_redirected_to ad_url(ad)