Sha256: 1358b471fc009550ed2ed37f7c8e9b3bf6519e30208c7e25ce6567634af7a97f
Contents?: true
Size: 575 Bytes
Versions: 7
Compression:
Stored size: 575 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, archive_number: 1) archival.unarchive! assert_not archival.reload.archived? end end end
Version data entries
7 entries across 7 versions & 2 rubygems