Sha256: 7940729c1aec1ee5443aed5927aa04befd778de2d0af15480ee847b49cde4caf

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper.rb'

module ConditionTests
  class InclusiveDescendantOfTest < ActiveSupport::TestCase
    def test_sanitize
      ben = users(:ben)
      drew = users(:drew)
      jennifer = users(:jennifer)
      tren = users(:tren)
      
      condition = Searchlogic::Condition::InclusiveDescendantOf.new(User)
      condition.value = ben
      assert_equal ["(\"users\".\"id\" = ?) OR (\"users\".\"id\" = ? OR \"users\".\"id\" = ? OR \"users\".\"id\" = ?)", ben.id, drew.id, tren.id, jennifer.id], condition.sanitize
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
searchlogic-1.5.6 test/condition_tests/inclusive_descendant_of_test.rb
searchlogic-1.5.4 test/condition_tests/inclusive_descendant_of_test.rb