1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

always create User with a name

This commit is contained in:
Akira Matsuda 2012-05-18 07:00:31 +09:00
parent b61db76581
commit e94cc24c2a

View file

@ -82,7 +82,7 @@ describe 'Kaminari::ActionViewExtension' do
context 'having 1 entry' do context 'having 1 entry' do
before do before do
User.create! User.create! :name => 'user1'
@users = User.page(1).per(25) @users = User.page(1).per(25)
end end
subject { helper.page_entries_info @users, :params => {:controller => 'users', :action => 'index'} } subject { helper.page_entries_info @users, :params => {:controller => 'users', :action => 'index'} }
@ -96,7 +96,7 @@ describe 'Kaminari::ActionViewExtension' do
context 'having more than 1 but less than a page of entries' do context 'having more than 1 but less than a page of entries' do
before do before do
10.times {|i| User.create!} 10.times {|i| User.create! :name => "user#{i}"}
@users = User.page(1).per(25) @users = User.page(1).per(25)
end end
subject { helper.page_entries_info @users, :params => {:controller => 'users', :action => 'index'} } subject { helper.page_entries_info @users, :params => {:controller => 'users', :action => 'index'} }
@ -110,7 +110,7 @@ describe 'Kaminari::ActionViewExtension' do
context 'having more than one page of entries' do context 'having more than one page of entries' do
before do before do
50.times {|i| User.create!} 50.times {|i| User.create! :name => "user#{i}"}
end end
describe 'the first page' do describe 'the first page' do