X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/92feab9112e64b8aab280cb90d5a5fef75646e3b..2d2b6d7ed8826d3034f5224ece94aa5f0f1b0e6a:/vendor/gems/composite_primary_keys-2.2.2/test/test_exists.rb diff --git a/vendor/gems/composite_primary_keys-2.2.2/test/test_exists.rb b/vendor/gems/composite_primary_keys-2.2.2/test/test_exists.rb deleted file mode 100644 index 56f4af29b..000000000 --- a/vendor/gems/composite_primary_keys-2.2.2/test/test_exists.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'abstract_unit' -require 'fixtures/article' -require 'fixtures/department' - -class TestExists < Test::Unit::TestCase - fixtures :articles, :departments - - def test_single_key_exists_giving_id - assert Article.exists?(1) - end - - def test_single_key_exists_giving_condition - assert Article.exists?(['name = ?', 'Article One']) - end - - def test_composite_key_exists_giving_ids_as_string - assert Department.exists?('1,1,') - end - - def test_composite_key_exists_giving_ids_as_array - assert Department.exists?([1,1]) - assert_equal(false, Department.exists?([1111,1111])) - end - - def test_composite_key_exists_giving_ids_as_condition - assert Department.exists?(['department_id = ? and location_id = ?', 1, 1]) - assert_equal(false, Department.exists?(['department_id = ? and location_id = ?', 11111, 11111])) - end -end \ No newline at end of file