Closed alexnsouza6 closed 4 years ago
There are some failing tests because of the new validation. In /spec/requests/api/v1/subjects_spec.rb, this code let!(:semester_subjects) { create_list(:subject, 2, semesters: [semester]) }
is failing because subject has_many semesters through offers so rails is creating an empty offer model when we add this semester. The empty offer is now invalid so the test fails. To avoid this we should create an offer manually then associate it with each subject.
This branch contains all model validations. Besides this, it contains its specs sorted out by context.