You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/03/25 08:50:17 UTC

[GitHub] [couchdb] dottorblaster commented on a change in pull request #2703: Port view_pagination integration test to elixir test suite

dottorblaster commented on a change in pull request #2703: Port view_pagination integration test to elixir test suite
URL: https://github.com/apache/couchdb/pull/2703#discussion_r397690146
 
 

 ##########
 File path: test/elixir/test/view_pagination_test.exs
 ##########
 @@ -0,0 +1,189 @@
+defmodule ViewPaginationTest do
+  use CouchTestCase
+
+  @moduletag :view_pagination
+
+  @moduledoc """
+  Integration tests for pagination.
+  This is a port of the view_pagination.js test suite.
+  """
+
+  @tag :with_db
+  test "basic view pagination", context do
+    db_name = context[:db_name]
+
+    docs = make_docs(0..99)
+    bulk_save(db_name, docs)
+
+    query_function = "function(doc) { emit(doc.integer, null); }"
+
+    0..99
+    |> Enum.filter(fn number -> rem(number, 10) === 0 end)
 
 Review comment:
   In my opinion the only other way to do this is declaring directly the list like `[0, 10, 20, 30]` 😅

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services