Created
June 7, 2017 19:25
-
-
Save Mirv/57b9a5a598fdeecf154c6a6e136662b2 to your computer and use it in GitHub Desktop.
Test errors
This file contains 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
3) Error: | |
RecipesControllerTest#test_should_destroy_recipe: | |
ActionController::UrlGenerationError: No route matches {:action=>"http://test.host/recipes/980190962", :controller=>"recipes"} | |
test/controllers/recipes_controller_test.rb:49:in `block (2 levels) in <class:RecipesControllerTest>' | |
test/controllers/recipes_controller_test.rb:47:in `block in <class:RecipesControllerTest>' | |
---log/test.log--- | |
RecipesControllerTest: test_should_destroy_recipe | |
------------------------------------------------- | |
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]] | |
Recipe Load (0.1ms) SELECT "recipes".* FROM "recipes" WHERE "recipes"."id" = ? LIMIT 1 [["id", 980190962]] | |
(0.1ms) SELECT COUNT(*) FROM "recipes" | |
(0.1ms) rollback transaction | |
(0.1ms) begin transaction | |
---Code that works in another project--- | |
test "should destroy recipe" do | |
recipe = recipes(:one) | |
assert_difference('Recipe.count', -1) do | |
puts "\n#{@recipe}\n" #has object made in output | |
delete recipe_url(recipe) | |
end | |
assert_redirected_to recipes_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment