Commit 2073db27

mo k <mo@mokhan.ca>
2012-08-01 02:31:14
add route specs for photos controller.
1 parent 50c6252
Changed files (1)
spec/routing/photos_routing_spec.rb
@@ -0,0 +1,13 @@
+require "spec_helper"
+describe PhotosController do
+  describe "routing" do
+    it "should route to create" do
+      post('creations/1/photos').should 
+        route_to(:controller => "photos", :action => "create", :creation_id => 1, :method => "POST")
+    end
+    it "should route to delete" do
+      delete('creations/1/photos').should 
+        route_to(:controller => "photos", :action => "destroy", :creation_id => 1, :method => "DELETE")
+    end
+  end
+end