After searching, can’t find the answer to this simple question. Yes, I read the Guides many times.
Here’s what I got so far.
test "there is no route for this request" do
assert_raise(Exception) {
post :the_route
}
end
The browser shows
Are there any resources that explain the basics of testing (besides the Guides)?
Thanks.
Have you looked into the routing assertions at all? They could be what you’re looking for. Most app’s I’ve worked on have at least one “routes_test”. check them out here:
http://api.rubyonrails.org/classes/ActionDispatch/Assertions/RoutingAssertions.html