Sha256: a5eb64e40841605f483f029db02abbe8288fde02d44ba45b3a5447d1ab72d5b4

Contents?: true

Size: 488 Bytes

Versions: 14

Compression:

Stored size: 488 Bytes

Contents

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

module ConditionTests
  class NotNilTest < ActiveSupport::TestCase
    def test_sanitize
      condition = Searchlogic::Condition::NotNil.new(Account, :column => Account.columns_hash["created_at"])
      condition.value = "1"
      assert_equal "\"accounts\".\"created_at\" IS NOT NULL", condition.sanitize
      condition.value = "false"
      assert_equal "\"accounts\".\"created_at\" IS NULL", condition.sanitize
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
schof-searchlogic-0.0.2 test/condition_tests/not_nil_test.rb
searchlogic-1.5.6 test/condition_tests/not_nil_test.rb
searchlogic-1.5.4 test/condition_tests/not_nil_test.rb
searchlogic-1.6.1 test/condition_tests/not_nil_test.rb
searchlogic-1.5.8 test/condition_tests/not_nil_test.rb
searchlogic-1.5.9 test/condition_tests/not_nil_test.rb
searchlogic-1.5.10 test/condition_tests/not_nil_test.rb
searchlogic-1.5.7 test/condition_tests/not_nil_test.rb
searchlogic-1.6.0 test/condition_tests/not_nil_test.rb
searchlogic-1.6.5 test/condition_tests/not_nil_test.rb
searchlogic-1.6.4 test/condition_tests/not_nil_test.rb
searchlogic-1.6.6 test/condition_tests/not_nil_test.rb
searchlogic-1.6.3 test/condition_tests/not_nil_test.rb
searchlogic-1.6.2 test/condition_tests/not_nil_test.rb