ref: master
plugins/lattes_curriculum/test/unit/person_test.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
require "test_helper" class PersonTest < ActiveSupport::TestCase def setup @environment = Environment.default @environment.enable_plugin(LattesCurriculumPlugin) end attr_reader :environment should 'destroy academic info if person is removed' do person = fast_create(Person) academic_info = fast_create(AcademicInfo, :person_id => person.id, :lattes_url => 'http://lattes.cnpq.br/2193972715230') assert_difference 'AcademicInfo.count', -1 do person.destroy end end should 'add lattes_url field to Person' do assert_includes Person.fields, 'lattes_url' end end |