Guest User

Untitled

a guest
May 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. describe User, ".find_for_database_authentication" do
  2. context "logging in with email" do
  3. subject { User.find_for_database_authentication({:email => admin.email}) }
  4. it {should == admin }
  5. end
  6.  
  7. context "logging in with username" do
  8. subject { User.find_for_database_authentication({:email => admin.username}) }
  9. it {should == admin }
  10. end
  11. end
Add Comment
Please, Sign In to add comment