]> git.openstreetmap.org Git - rails.git/commitdiff
Use max changeset query limit setting in tests
authorAnton Khorev <tony29@yandex.ru>
Tue, 8 Aug 2023 00:41:04 +0000 (03:41 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 8 Aug 2023 00:43:35 +0000 (03:43 +0300)
test/controllers/api/changesets_controller_test.rb

index 40b8bc9f280e72ba4f0110d136dd56e6eb99adea..7f2cd0abb35c908d957835d12833c7648a470d57 100644 (file)
@@ -1959,7 +1959,11 @@ module Api
       get changesets_path(:limit => "0")
       assert_response :bad_request
 
-      get changesets_path(:limit => "101")
+      get changesets_path(:limit => Settings.max_changeset_query_limit)
+      assert_response :success
+      assert_changesets [changeset5, changeset4, changeset3, changeset2, changeset1]
+
+      get changesets_path(:limit => Settings.max_changeset_query_limit + 1)
       assert_response :bad_request
     end