Rspec user spec

Finished test cases for user_spec.