Skip to content

Add spec for attributes and email validation of the list model

paz requested to merge list-spec-email-validation into master

This commit adds some examples for the list model. Since this is the first one regarding the tests, i leave some general thoughts on the issue.

My idea to get started with this whole testing is to first go through the models. To make the code review easier i'd like to split the changes into smaller chunks. My hope is that this will led to a more focused discussion and make the changes with every commit easier to understand.

@paz if you have another idea about the procedere: i am very open for feedback :).

A question regarding the validations of the email in the list model here: Currently the list object is invalid if the email attribute is nil or blank. This line https://git.codecoop.org/schleuder/schleuder3/blob/master/lib/schleuder/list.rb#L18 makes me think, that this was not intended. Should a list be valid with a blank or nil value on email?

Part of #1 (closed)

Merge request reports