Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.48 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe "Documents" do
  4.   before(:each) do
  5.     @user = Factory.create(:user)
  6.   end
  7.  
  8.   describe "GET /documents" do
  9.     it "Needs authentication" do
  10.       get documents_path
  11.       response.status.should be(302)
  12.     end
  13.  
  14.     it "Needs authentication" do
  15.       get new_user_session_path
  16.       post new_user_session_path, :email => @user.email, :password => @user.password
  17.       get documents_path
  18.       response.status.should be(302)
  19.     end
  20.   end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement