Added rspec test for pagination