Sha256: 347802de7eaae0b240098a9bb689d6844558ea2148271ec22a12be808e66d1a3
Contents?: true
Size: 673 Bytes
Versions: 12
Compression:
Stored size: 673 Bytes
Contents
require_relative "test_helper" class PolymorphicTest < ActiveSupport::TestCase test "archive item with polymorphic association" do archival = Archival.create! poly = archival.polys.create! archival.archive assert archival.reload.archived? assert poly.reload.archived? end test "unarchive item with polymorphic association" do archive_attributes = { :archive_number => "test", :archived_at => Time.now } archival = Archival.create!(archive_attributes) poly = archival.polys.create!(archive_attributes) archival.unarchive assert_not archival.reload.archived? assert_not poly.reload.archived? end end
Version data entries
12 entries across 12 versions & 1 rubygems