Created
January 21, 2012 16:54
-
-
Save itsbth/1653273 to your computer and use it in GitHub Desktop.
Uploaded by UploadToGist for Sublime Text 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe DupesController do | |
| describe "GET /new" do | |
| it "should redirect to root_path if user is not logged in" do | |
| get :new | |
| request.should redirect_to root_url | |
| end | |
| it "should display the form if user is logged in" do | |
| session[:user_id] = FactoryGirl.create(:user).id | |
| get :new | |
| request.should render_template 'dupes/new' | |
| end | |
| end | |
| describe "GET /:id" do | |
| it "should redirect to root_path if it can't find the dupe" do | |
| get :show, id: -1 | |
| request.should redirect_to root_url | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment