Guest User

Untitled

a guest
Apr 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb')
  2.  
  3. describe Users, "authenticate action via REST" do
  4.  
  5. specify "authenticate" do
  6. dispatch_to(Users, :authenticate, :username => "test", :password => "test)
  7. controller.status.should == 200
  8. p controller.body
  9. end
  10. end
  11.  
  12. describe Users, "authenticate action via REST using routes" do
  13. specify "authenticate" do
  14. post("/path_to_login.xml", :username => "test", :password => "test")
  15. controller.status.should == 200
  16. end
  17. end
Add Comment
Please, Sign In to add comment