Skip to content

Commit ad20d4a

Browse files
committed
[API] Cleaned up the tests for predicate methods from commit 0116b2e
Removed the extra test files, and added a test case which test the predicate method availability and idenity. Related: #133, #134
1 parent 0116b2e commit ad20d4a

File tree

8 files changed

+20
-287
lines changed

8 files changed

+20
-287
lines changed

elasticsearch-api/test/unit/exists?_document_test.rb

Lines changed: 0 additions & 85 deletions
This file was deleted.

elasticsearch-api/test/unit/exists_document_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ class ExistsTest < ::Test::Unit::TestCase
7878
end
7979
end
8080

81+
should "be aliased as predicate method" do
82+
assert_nothing_raised do
83+
subject.exists?(:index => 'foo', :type => 'bar', :id => '1') == subject.exists(:index => 'foo', :type => 'bar', :id => '1')
84+
end
85+
end
8186
end
8287

8388
end

elasticsearch-api/test/unit/indices/exists?_test.rb

Lines changed: 0 additions & 66 deletions
This file was deleted.

elasticsearch-api/test/unit/indices/exists_alias?_test.rb

Lines changed: 0 additions & 68 deletions
This file was deleted.

elasticsearch-api/test/unit/indices/exists_alias_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class IndicesExistsAliasTest < ::Test::Unit::TestCase
6161
end
6262
end
6363

64+
should "be aliased as predicate method" do
65+
assert_nothing_raised do
66+
subject.indices.exists_alias?(:name => 'foo') == subject.indices.exists_alias(:name => 'foo')
67+
end
68+
end
6469
end
6570

6671
end

elasticsearch-api/test/unit/indices/exists_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ class IndicesExistsTest < ::Test::Unit::TestCase
5959
end
6060
end
6161

62+
should "be aliased as predicate method" do
63+
assert_nothing_raised do
64+
subject.indices.exists?(:index => 'foo') == subject.indices.exists(:index => 'foo')
65+
end
66+
end
6267
end
6368

6469
end

elasticsearch-api/test/unit/indices/exists_type?_test.rb

Lines changed: 0 additions & 68 deletions
This file was deleted.

elasticsearch-api/test/unit/indices/exists_type_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class IndicesExistsTypeTest < ::Test::Unit::TestCase
6161
end
6262
end
6363

64+
should "be aliased as predicate method" do
65+
assert_nothing_raised do
66+
subject.indices.exists_type?(:index => 'foo', :type => 'bar') == subject.indices.exists_type(:index => 'foo', :type => 'bar')
67+
end
68+
end
6469
end
6570

6671
end

0 commit comments

Comments
 (0)