files_routing_spec.rb revision ee5342a8882c2fc7631fcffb5497e6597747887c
e8ceec219830407bded84634716d37d45d3a5872Julian Kornbergerrequire 'spec_helper'
46dd7ca898be6d5dbdfda64fd90ce01e253c0878Julian Kornberger # FIXME some/path must exist in repository
46dd7ca898be6d5dbdfda64fd90ce01e253c0878Julian Kornberger #it { should route(:get, 'repopath/some/path' ).to(repository_id: 'repopath', action: :files, path: 'some/path') }
ef1f1ad3d88023d93475dfdce00bd9f230917660Eugen Kuksa it { should route(:get, 'repopath' ).to(repository_id: 'repopath', action: :files ) }
e8ceec219830407bded84634716d37d45d3a5872Julian Kornberger it { should route(:get, 'repositories/repopath/files/new' ).to(repository_id: 'repopath', action: :new ) }
e8ceec219830407bded84634716d37d45d3a5872Julian Kornberger it { should route(:post, 'repositories/repopath/files' ).to(repository_id: 'repopath', action: :create ) }
46dd7ca898be6d5dbdfda64fd90ce01e253c0878Julian Kornberger it { should route(:get, 'repositories/repopath/12ab/action' ).to(repository_id: 'repopath', action: :action, ref: '12ab' ) }
46dd7ca898be6d5dbdfda64fd90ce01e253c0878Julian Kornberger it { should route(:get, 'repositories/repopath/12ab/files/some/path' ).to(repository_id: 'repopath', action: :files, ref: '12ab', path: 'some/path' ) }
391f72f778a8c9e1cbaed1860f4a4754d6881c8aEugen Kuksa it { should route(:get, 'repositories/repopath/master/history' ).to(repository_id: 'repopath', action: :history, ref: 'master' ) }