Sha256: f1cd71ea63a763a133c4687a16eb8fa52f0fba023d555f678ce33a749e258e8c

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

require_relative "test_helper"

class BogusRelationTest < ActiveSupport::TestCase

  test "does not successfully archive" do
    archival = BogusRelation.create!
    stub(ActiveRecord::Base.logger).error(
      satisfy do |arg|
        if arg.is_a?(String)
          arg == "SQLite3::SQLException: no such column: bogus_relations.bogus_relation_id"
        elsif arg.is_a?(Array)
          arg.join.match?(%r{gems/activerecord}) # this is gonna be in the stack trace somewhere
        else
          raise "unexpected logging"
        end
      end
    )
    assert_not archival.archive!
    assert_not archival.reload.archived?
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archival_record-3.0.1 test/bogus_relation_test.rb