prix-fixe

Expand History Expand History
Collapse History Collapse History

Declare a POST /notes route

This commit resolves the previous error:

Error:
UserSharesAMessageTest#test_visiting_the_index:
ActionController::RoutingError: No route matches [POST] "/notes"

By declaring a post route with "/notes" as the path, controller: "notes“, and action: "create", we configure our router to route requests to the notes#create action.

When we run the test again, it raises a new error:

Error:
UserSharesAMessageTest#test_visiting_the_index:
AbstractController::ActionNotFound: The action 'create' could not be found for NotesController