swt2-intro-exercise / rails-exercise-18-lassesteffen

rails-exercise-18-lassesteffen created by GitHub Classroom
MIT License
0 stars 0 forks source link

New author page should show validation errors #8

Closed swt2public closed 5 years ago

swt2public commented 5 years ago

Scenario

Given users visit the new author page And fill in only first name and homepage When they click submit Then the page should show an error reporting what went wrong

Hints

The fact that particular set of data cannot be saved should be communicated to the user. Errors of attempted saves of objects are stored in the errors attribute.

It can be checked (@author.errors.any?) and can be iterated over to extract error details (@article.errors.full_messages.each). Adding this type of code also requires modifying the new action of the AuthorsController.

Error

Expected to find text matching /error/i in "name homepage\ncreate new author back"

Estimated progress: 44% complete

swt2public commented 5 years ago

Sorry, it's not working for me yet:

Scenario

Given users visit the new author page And fill in only first name and homepage When they click submit Then the page should show an error reporting what went wrong

Error

Expected to find text matching /error/i in "name homepage\ncreate new author back"

If you have problems solving this task, please don't hesitate to contact the teaching team!