Sha256: e46df467132ac059db68cbe16830bbd1eddece23ae889226973b35925ba06092

Contents?: true

Size: 447 Bytes

Versions: 5

Compression:

Stored size: 447 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

5 entries across 5 versions & 1 rubygems

Version Path
acts_as_archival-1.1.1 test/ambiguous_table_test.rb
acts_as_archival-1.1.0 test/ambiguous_table_test.rb
acts_as_archival-1.0.0 test/ambiguous_table_test.rb
acts_as_archival-0.6.1 test/ambiguous_table_test.rb
acts_as_archival-0.6.0 test/ambiguous_table_test.rb