aboutsummaryrefslogtreecommitdiffstats
path: root/spec/routing/networks_spec.rb
blob: 941f98c1ee60b6ecd6bac3e9297470134c421602 (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
require 'spec_helper'

describe NetworksController do
  describe "routing" do
    it "not recognize #routes" do
      expect(get( "/line_referentials/1/networks/2/routes")).not_to route_to(
        :controller => "networks", :action => "routes",
        :line_referential_id => "1", :id => "2"
      )
    end
    it "not recognize #lines" do
      expect(get( "/line_referentials/1/networks/2/lines")).not_to route_to(
        :controller => "networks", :action => "lines",
        :line_referential_id => "1", :id => "2"
      )
    end
    it "recognize and generate #show" do
      expect(get( "/line_referentials/1/networks/2")).to route_to(
        :controller => "networks", :action => "show",
        :line_referential_id => "1", :id => "2"
      )
    end
  end
end