forked from ddnexus/pagy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
112 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../test_helper' | ||
|
||
describe 'pagy/deprecation' do | ||
|
||
describe 'Pagy.deprecated_var' do | ||
it 'deprecates arg and returns right value' do | ||
assert_output('', "[PAGY WARNING] deprecated use of `var` var will not be supported in 5.0! Use `new_var: \"new-value\"` instead.") do | ||
_(Pagy.deprecated_var(:var, 'deprecated-val', :new_var, 'new-value')).must_equal 'new-value' | ||
end | ||
end | ||
end | ||
|
||
describe 'Pagy.deprecated_arg' do | ||
it 'deprecates arg and returns right value' do | ||
assert_output('', "[PAGY WARNING] deprecated use of positional `arg` arg will not be supported in 5.0! Use only the keyword arg `new_key: \"new-value\"` instead.") do | ||
_(Pagy.deprecated_arg(:arg, 'deprecated-val', :new_key, 'new-value')).must_equal 'new-value' | ||
end | ||
end | ||
end | ||
|
||
describe 'Pagy.deprecated_order' do | ||
it 'deprecates arg order and returns them inverted' do | ||
assert_output('', "[PAGY WARNING] inverted use of pagy/page in pagy_url_for will not be supported in 5.0! Use pagy_url_for(pagy, page) instead.") do | ||
_(Pagy.deprecated_order('page', 'pagy')).must_equal %w[pagy page] | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
"[1] pagy/extras/searchkick::controller_methods::#pagy_searchkick#test_0001_paginates response with defaults": | ||
- R-B-a-41 | ||
- R-B-a-42 | ||
- R-B-a-43 | ||
- R-B-a-44 | ||
- R-B-a-45 | ||
- R-B-a-46 | ||
- R-B-a-47 | ||
- R-B-a-48 | ||
- R-B-a-49 | ||
- R-B-a-50 | ||
- R-B-a-51 | ||
- R-B-a-52 | ||
- R-B-a-53 | ||
- R-B-a-54 | ||
- R-B-a-55 | ||
- R-B-a-56 | ||
- R-B-a-57 | ||
- R-B-a-58 | ||
- R-B-a-59 | ||
- R-B-a-60 | ||
"[1] pagy/extras/searchkick::controller_methods::#pagy_searchkick#test_0004_paginates with overflow": | ||
- R-b-991 | ||
- R-b-992 | ||
- R-b-993 | ||
- R-b-994 | ||
- R-b-995 | ||
- R-b-996 | ||
- R-b-997 | ||
- R-b-998 | ||
- R-b-999 | ||
- R-b-1000 | ||
"[1] pagy/extras/searchkick::controller_methods::#pagy_searchkick#test_0002_paginates results with defaults": | ||
- R-a-41 | ||
- R-a-42 | ||
- R-a-43 | ||
- R-a-44 | ||
- R-a-45 | ||
- R-a-46 | ||
- R-a-47 | ||
- R-a-48 | ||
- R-a-49 | ||
- R-a-50 | ||
- R-a-51 | ||
- R-a-52 | ||
- R-a-53 | ||
- R-a-54 | ||
- R-a-55 | ||
- R-a-56 | ||
- R-a-57 | ||
- R-a-58 | ||
- R-a-59 | ||
- R-a-60 | ||
"[1] pagy/extras/searchkick::controller_methods::#pagy_searchkick#test_0003_paginates with vars": | ||
- R-b-11 | ||
- R-b-12 | ||
- R-b-13 | ||
- R-b-14 | ||
- R-b-15 | ||
- R-b-16 | ||
- R-b-17 | ||
- R-b-18 | ||
- R-b-19 | ||
- R-b-20 |