阅读背景:

如何确保Rails controller测试后的响应是JSON,为什么这不是正确的方法?

来源:互联网 

I have a standard scaffolded blog PostController, and I'm trying to write a simple controller test to test the JSON API. However, instead of a 201 created (in the format.json block), I am getting a 302 redirected, as if the format.html block is being executed. Why, and how should I fix it?I have a standard scaffolded blog PostControlle




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: