When I run my rspec test I receive validation error year is required
, but in my factory I set year value. I don't know why I receive this error.
FactoryBot.define do
factory :syllabus do
year { 2019 }
cycle_academic { "1" }
modality { "presencial" }
syllabus_content { "{}" }
association :doc_template
association :user
association :curriculum_course
association :cycle
credits { 4 }
weekly_hours { 5 }
trait :syllabus_estrategia do
course { :estrategia }
end
trait :syllabus_ingles1 do
course { :ingles1 }
end
trait :syllabus_ingles2 do
course { :ingles2 }
end
trait :syllabus_matematica do
course { :matematica }
end
end
end
In my rspec file I invoque this factory with this line
it "order to approver" do
syllabus_general = FactoryBot.create(:syllabus)
end
year
column in db? – Vasilisa