I have a validation in model ABC and that is:-
Now the record should not be saved without the presence of employee_id
right. But now i wrote a test case like this:-
abc = Abc.new(:name => "ABC Group")
assert abc.save, "Saving the record without employee_id"
But still this record gets saved in database. Why so .. ? What i am
doing wrong here.. My database migrations for employee_id column as
t.integer :employee_id, :null => false