mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Fix tests for Sinatra
This commit is contained in:
parent
e07914f69c
commit
c9ace59662
1 changed files with 4 additions and 4 deletions
|
@ -259,7 +259,7 @@ describe 'Kaminari::ActionViewExtension' do
|
||||||
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
|
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
|
||||||
it { should_not match(/rel="prev"/) }
|
it { should_not match(/rel="prev"/) }
|
||||||
it { should match(/rel="next"/) }
|
it { should match(/rel="next"/) }
|
||||||
it { should match(/href=\"\/users\?page=2\"/) }
|
it { should match(/\?page=2/) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'the middle page' do
|
context 'the middle page' do
|
||||||
|
@ -269,9 +269,9 @@ describe 'Kaminari::ActionViewExtension' do
|
||||||
|
|
||||||
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
|
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
|
||||||
it { should match(/rel="prev"/) }
|
it { should match(/rel="prev"/) }
|
||||||
it { should match(/href="\/users\?page=1/) }
|
it { should match(/\?page=1/) }
|
||||||
it { should match(/rel="next"/) }
|
it { should match(/rel="next"/) }
|
||||||
it { should match(/href="\/users\?page=3/) }
|
it { should match(/\?page=3/) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'the last page' do
|
context 'the last page' do
|
||||||
|
@ -281,7 +281,7 @@ describe 'Kaminari::ActionViewExtension' do
|
||||||
|
|
||||||
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
|
subject { helper.rel_next_prev_link_tags @users, :params => {:controller => 'users', :action => 'index'} }
|
||||||
it { should match(/rel="prev"/) }
|
it { should match(/rel="prev"/) }
|
||||||
it { should match(/href="\/users\?page=2"/) }
|
it { should match(/\?page=2"/) }
|
||||||
it { should_not match(/rel="next"/) }
|
it { should_not match(/rel="next"/) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue