mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Remove unused code
The master branch no longer has support for Rails < 3.1.
This commit is contained in:
parent
60b6875734
commit
5630072590
1 changed files with 6 additions and 14 deletions
|
@ -52,26 +52,18 @@ describe 'Kaminari::Helpers' do
|
|||
|
||||
context "for first page" do
|
||||
subject { Tag.new(helper, :param_name => "user[page]").page_url_for(1) }
|
||||
if ActiveSupport::VERSION::STRING < "3.1.0"
|
||||
it { should_not match(/user\[page\]=\d+/) }
|
||||
it { should match(/user\[scope\]=active/) }
|
||||
else
|
||||
|
||||
it { should_not match(/user%5Bpage%5D=\d+/) } # not match user[page]=\d+
|
||||
it { should match(/user%5Bscope%5D=active/) } # match user[scope]=active
|
||||
end
|
||||
end
|
||||
|
||||
context "for other page" do
|
||||
subject { Tag.new(helper, :param_name => "user[page]").page_url_for(2) }
|
||||
if ActiveSupport::VERSION::STRING < "3.1.0"
|
||||
it { should match(/user\[page\]=2/) }
|
||||
it { should match(/user\[scope\]=active/) }
|
||||
else
|
||||
|
||||
it { should match(/user%5Bpage%5D=2/) } # match user[page]=2
|
||||
it { should match(/user%5Bscope%5D=active/) } # match user[scope]=active
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "with param_name = 'foo.page' option" do
|
||||
before do
|
||||
|
|
Loading…
Reference in a new issue