我有简单的 API 控制器和show动作:
def show
respond_with(current_api_user)
end
current_api_userDoorkeeper gem提供的方法在哪里。最近我用assigns方法测试过这种情况,但是这个控制器中没有实例变量赋值。是否有一些现成的模拟控制器的测试助手respond_with?我应该自己嘲笑它吗?
任何帮助表示赞赏。
我有简单的 API 控制器和show动作:
def show
respond_with(current_api_user)
end
current_api_userDoorkeeper gem提供的方法在哪里。最近我用assigns方法测试过这种情况,但是这个控制器中没有实例变量赋值。是否有一些现成的模拟控制器的测试助手respond_with?我应该自己嘲笑它吗?
任何帮助表示赞赏。