blob: 774431dc3b29bc4db16f3a005b3199c756fc8e68 (
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 CompaniesController do
describe "routing" do
it "not recognize #routes" do
expect(get( "/line_referentials/1/companies/2/routes")).not_to route_to(
:controller => "companies", :action => "routes",
:line_referential_id => "1", :id => "2"
)
end
it "not recognize #lines" do
expect(get( "/line_referentials/1/companies/2/lines")).not_to route_to(
:controller => "companies", :action => "lines",
:line_referential_id => "1", :id => "2"
)
end
it "recognize and generate #show" do
expect(get( "/line_referentials/1/companies/2")).to route_to(
:controller => "companies", :action => "show",
:line_referential_id => "1", :id => "2"
)
end
end
end
|