Fix bug in rspec code for pagination