From 1bcc1ab2a5ce8d2ee832f8161d24fc4ceafdd04e Mon Sep 17 00:00:00 2001 From: Mirv Date: Fri, 2 Jun 2017 20:33:45 +0000 Subject: [PATCH] extra type in the tests caused all testing to pause --- app/controllers/recipes_controller.rb | 2 +- test/controllers/ingredient_controller_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/recipes_controller.rb b/app/controllers/recipes_controller.rb index 01a9fd8..6c9e4ce 100644 --- a/app/controllers/recipes_controller.rb +++ b/app/controllers/recipes_controller.rb @@ -103,7 +103,7 @@ def set_recipe end def require_same_user - if not is_owner? then + if current_user == @recipe.user_id then flash[:danger] = "You can only edit your own recipes" redirect_to recipes_path end diff --git a/test/controllers/ingredient_controller_test.rb b/test/controllers/ingredient_controller_test.rb index 8cefa13..a67648e 100644 --- a/test/controllers/ingredient_controller_test.rb +++ b/test/controllers/ingredient_controller_test.rb @@ -2,12 +2,12 @@ class IngredientControllerTest < ActionController::TestCase test "should get name:string" do - get :name:string + get :name assert_response :success end test "should get recipe_id:integer" do - get :recipe_id:integer + get :recipe_id assert_response :success end