summaryrefslogtreecommitdiff
path: root/spec/routing/tournaments_routing_spec.rb
blob: e4a229ccb751a061f3f35d0b34867921250e5b81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "spec_helper"

describe TournamentsController do
  describe "routing" do

    it "routes to #index" do
      get("/tournaments").should route_to("tournaments#index")
    end

    it "routes to #new" do
      get("/tournaments/new").should route_to("tournaments#new")
    end

    it "routes to #show" do
      get("/tournaments/1").should route_to("tournaments#show", :id => "1")
    end

    it "routes to #edit" do
      get("/tournaments/1/edit").should route_to("tournaments#edit", :id => "1")
    end

    it "routes to #create" do
      post("/tournaments").should route_to("tournaments#create")
    end

    it "routes to #update" do
      put("/tournaments/1").should route_to("tournaments#update", :id => "1")
    end

    it "routes to #destroy" do
      delete("/tournaments/1").should route_to("tournaments#destroy", :id => "1")
    end

  end
end