[openstreetmap/openstreetmap-website] Replace trace-related fixtures with factories. (#1347)

Andy Allan notifications at github.com
Tue Nov 1 10:45:19 UTC 2016


gravitystorm commented on this pull request.



>      get :view, { :display_name => users(:public_user).display_name, :id => 0 }, { :user => users(:public_user).id }
     assert_response :redirect
     assert_redirected_to :action => :list
 
-    # And finally we should be able to do it with the owner of the trace
-    get :view, { :display_name => users(:public_user).display_name, :id => 5 }, { :user => users(:public_user).id }
+    # And finally we should not be able to view a deleted trace
+    deleted_trace_file = create(:trace, :deleted)

To be honest I think the testing a deleted trace should be a different test entirely from testing the non-existent ones, but I've moved the creations to the top of the methods anyway.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1347
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161101/60e21830/attachment.html>


More information about the rails-dev mailing list