OSDN Git Service

ご恩登録機能のCRUDをscaffoldベースで生成し実装
[on-kiroku/go_on_kiroku_tyou.git] / spec / routing / goons_routing_spec.rb
1 require "spec_helper"
2
3 describe GoonsController do
4   describe "routing" do
5
6     it "recognizes and generates #index" do
7       { :get => "/goons" }.should route_to(:controller => "goons", :action => "index")
8     end
9
10     it "recognizes and generates #new" do
11       { :get => "/goons/new" }.should route_to(:controller => "goons", :action => "new")
12     end
13
14     it "recognizes and generates #show" do
15       { :get => "/goons/1" }.should route_to(:controller => "goons", :action => "show", :id => "1")
16     end
17
18     it "recognizes and generates #edit" do
19       { :get => "/goons/1/edit" }.should route_to(:controller => "goons", :action => "edit", :id => "1")
20     end
21
22     it "recognizes and generates #create" do
23       { :post => "/goons" }.should route_to(:controller => "goons", :action => "create")
24     end
25
26     it "recognizes and generates #update" do
27       { :put => "/goons/1" }.should route_to(:controller => "goons", :action => "update", :id => "1")
28     end
29
30     it "recognizes and generates #destroy" do
31       { :delete => "/goons/1" }.should route_to(:controller => "goons", :action => "destroy", :id => "1")
32     end
33
34   end
35 end