blob: 45e426f4ce3afc8d11f46b9f2f94f50370ea052d (
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
 | require 'spec_helper'
describe TimeTablesController do
  describe "routing" do
    it "not recognize #routes" do
      get( "/referentials/1/time_tables/2/routes").should_not route_to(
        :controller => "time_tables", :action => "routes",
        :referential_id => "1", :id => "2"
      )
    end
    it "not recognize #lines" do
      get( "/referentials/1/time_tables/2/lines").should_not route_to(
        :controller => "time_tables", :action => "lines",
        :referential_id => "1", :id => "2"
      )
    end
    it "not recognize #time_table_periods" do
      get( "/referentials/1/time_tables/2/time_table_periods").should_not route_to(
        "time_table_periods#index",
        :referential_id => "1", :time_table_id => "2"
      )
    end
    it "recognize and generate #show" do
      get( "/referentials/1/time_tables/2").should route_to(
        :controller => "time_tables", :action => "show",
        :referential_id => "1", :id => "2"
      )
    end
  end
end
 |