Sha256: 9702b5be6fabd6ff582802e19fb321f446170bc5f320df4015f3f6a1b9da44a8

Contents?: true

Size: 450 Bytes

Versions: 9

Compression:

Stored size: 450 Bytes

Contents

require_relative "test_helper"

class AmbiguousTableTest < ActiveSupport::TestCase

  test "no ambiguous table problem" do
    archival = Archival.create!
    child = archival.archivals.create!
    child.archive!

    # this is a bug fix for a problem wherein table names weren't being
    # namespaced, so if a table joined against itself, incorrect SQL was
    # generated
    assert_equal 1, Archival.unarchived.joins(:archivals).count
  end

end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
archival_record-3.0.1 test/ambiguous_table_test.rb
archival_record-3.0.0 test/ambiguous_table_test.rb
acts_as_archival-2.1.0 test/ambiguous_table_test.rb
acts_as_archival-2.0.0 test/ambiguous_table_test.rb
archival_record-2.0.2 test/ambiguous_table_test.rb
archival_record-2.0.1 test/ambiguous_table_test.rb
archival_record-2.0.0 test/ambiguous_table_test.rb
acts_as_archival-1.4.0 test/ambiguous_table_test.rb
acts_as_archival-1.3.0 test/ambiguous_table_test.rb