ref: master
plugins/soft_delete/test/unit/profile_test.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
require 'test_helper' class ProfileTest < ActiveSupport::TestCase should 'be able to load a deleted profile and its user' do user = create_user person = user.person person_id = person.id person.destroy deleted_person = Person.with_deleted.find person_id assert_equal person, deleted_person # association assert_equal user, deleted_person.user end end |