Sha256: 80ae1a788a95c64f80b64186d2fa332beaabc42cd03aa4a27306638b7aeb13ca
Contents?: true
Size: 579 Bytes
Versions: 2
Compression:
Stored size: 579 Bytes
Contents
require_relative "test_helper" # Rails 5 introduced a new base class, and this is gonna test that if defined?(ApplicationRecord) class ApplicationRecordTest < ActiveSupport::TestCase test "archive archives the record" do archival = ApplicationRecordRow.create! archival.archive! assert archival.reload.archived? end test "unarchive unarchives archival records" do archival = ApplicationRecordRow.create!(archived_at: Time.now.utc, archive_number: 1) archival.unarchive! assert_not archival.reload.archived? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
archival_record-3.0.1 | test/application_record_test.rb |
archival_record-3.0.0 | test/application_record_test.rb |