diff options
| author | Robert | 2017-08-08 12:19:49 +0200 |
|---|---|---|
| committer | Robert | 2017-08-08 12:19:49 +0200 |
| commit | f282c2db36440b55044b90791dd21eb2b325f8d3 (patch) | |
| tree | f1db8dc76989ac1f1bf601e164657eb508c7be9b | |
| parent | 0b79907ea95a1f2fa9c8766474773f6555f49f37 (diff) | |
| download | chouette-core-f282c2db36440b55044b90791dd21eb2b325f8d3.tar.bz2 | |
Refs: #4189@0.5h; routing specs updated to specify desired behavior exactly
| -rw-r--r-- | spec/routing/routes_routing_spec.rb | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/spec/routing/routes_routing_spec.rb b/spec/routing/routes_routing_spec.rb index ca2d3ade9..4635603d4 100644 --- a/spec/routing/routes_routing_spec.rb +++ b/spec/routing/routes_routing_spec.rb @@ -1,11 +1,18 @@ RSpec.describe "routes for Routes", type: :routing do - it "routes to /referentials/:id/lines/:id/routes/:id/duplicate" do - expect( - get: '/referentials/:referential_id/lines/:line_id/routes/:id/duplicate' - ).to be_routable + context "routes /referentials/:id/lines/:id/routes/:id/duplicate" do - expect( - post: '/referentials/:referential_id/lines/:line_id/routes/:id/duplicate' - ).to be_routable + let( :controller ){ {controller: 'routes', referential_id: ':referential_id', line_id: ':line_id', id: ':id'} } + + it 'with method get to #duplicate' do + expect( + get: '/referentials/:referential_id/lines/:line_id/routes/:id/duplicate' + ).to route_to controller.merge(action: 'duplicate') + end + + it 'with method post to #post_duplicate' do + expect( + post: '/referentials/:referential_id/lines/:line_id/routes/:id/duplicate' + ).to route_to controller.merge(action: 'post_duplicate') + end end end |
