Advertisement
Guest User

Untitled

a guest
Jun 1st, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. require 'test_helper'
  2.  
  3. feature "Authentication" do
  4.  
  5. describe "#create" do
  6. it "logs_in user with valid email+password" do
  7. user = User.create!(
  8. email: "user_1@domain.com",
  9. password: "password123",
  10. password_confirmation: "password123"
  11. )
  12.  
  13. post api_v1_user_session_path, {
  14. email: user.email,
  15. password: user.password
  16. }
  17.  
  18. assert_equal 200, last_response.status
  19. end
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement