Sha256: afc298fc9e545a429a88cf64e5d5cb8d84732cefc57f39c55558d04f2b6b2f62

Contents?: true

Size: 482 Bytes

Versions: 5

Compression:

Stored size: 482 Bytes

Contents

require_relative "test_helper"

class MassAttributeTest < ActiveSupport::TestCase
  test "archive works when attr_accessible present" do
    archival = MassAttributeProtected.create(:color => "pink")
    archival.archive

    assert archival.reload.archived?
  end

  test "unarchive works when attr_accessible present" do
    archival = MassAttributeProtected.create(:color => "pink")
    archival.archive
    archival.unarchive

    assert_not archival.reload.archived?
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
acts_as_archival-0.5.1 test/mass_attribute_test.rb
acts_as_archival-0.5.0 test/mass_attribute_test.rb
acts_as_archival-0.4.2 test/mass_attribute_test.rb
acts_as_archival-0.4.1 test/mass_attribute_test.rb
acts_as_archival-0.4.0 test/mass_attribute_test.rb