Skip to content

Commit 0d949fc

Browse files
committed
refactor(test): 11 ignore design docs from python to elixir
1 parent b7743a9 commit 0d949fc

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

test/elixir/test/config/suite.elixir

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,5 +731,8 @@
731731
],
732732
"BasicFindTest": [
733733
"simple find"
734+
],
735+
"IgnoreDesignDocsForAllDocsIndexTests": [
736+
"should not return design docs"
734737
]
735738
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
2+
# use this file except in compliance with the License. You may obtain a copy of
3+
# the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations under
11+
# the License.
12+
13+
defmodule IgnoreDesignDocsForAllDocsIndexTests do
14+
use CouchTestCase
15+
16+
@db_name "ignore-design-docs"
17+
18+
setup do
19+
MangoDatabase.recreate(@db_name)
20+
docs = [
21+
%{"_id" => "_design/my-design-doc"},
22+
%{"_id" => "54af50626de419f5109c962f", "user_id" => 0, "age" => 10, "name" => "Jimi"},
23+
%{"_id" => "54af50622071121b25402dc3", "user_id" => 1, "age" => 11, "name" => "Eddie"}
24+
]
25+
MangoDatabase.save_docs(@db_name, docs)
26+
:ok
27+
end
28+
29+
test "should not return design docs" do
30+
{:ok, docs} = MangoDatabase.find(@db_name, %{"_id" => %{"$gte" => nil}})
31+
assert length(docs) == 2
32+
end
33+
end

0 commit comments

Comments
 (0)