OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/spec/routing/documents_routing_spec.rb

34 lines
1.6 KiB

require 'spec_helper'
describe DocumentsController do
describe "routing" do
it { get('/projects/567/documents').should route_to(:controller => 'documents',
:action => 'index',
:project_id => '567' ) }
it { get('/projects/567/documents/new').should route_to(:controller => 'documents',
:action => 'new',
:project_id => '567' ) }
it { get('/documents/22').should route_to(:controller => 'documents',
:action => 'show',
:id => '22') }
it { get('/documents/22/edit').should route_to(:controller => 'documents',
:action => 'edit',
:id => '22') }
it { post('/projects/567/documents').should route_to(:controller => 'documents',
:action => 'create',
:project_id => '567') }
it { put('/documents/567').should route_to(:controller => 'documents',
:action => 'update',
:id => '567') }
it { delete('/documents/567').should route_to(:controller => 'documents',
:action => 'destroy',
:id => '567') }
end
end