@ -34,6 +34,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository' ) )
. to route_to ( controller : 'repositories' ,
action : 'show' ,
format : 'html' ,
project_id : 'testproject' )
}
@ -41,6 +42,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'show' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' )
}
@ -49,6 +51,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/folder%20with%20spaces' ) )
. to route_to ( controller : 'repositories' ,
action : 'show' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'folder with spaces' )
}
@ -57,11 +60,24 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/revisions/5' ) )
. to route_to ( controller : 'repositories' ,
action : 'show' ,
format : 'html' ,
rev : '5' ,
project_id : 'testproject' )
}
end
describe 'changes with js file (regression #24960)' do
it {
expect ( get ( '/projects/testproject/repository/revisions/my-branch/changes/assets/test.js' ) )
. to route_to ( controller : 'repositories' ,
action : 'changes' ,
path : 'assets/test.js' ,
rev : 'my-branch' ,
format : 'html' ,
project_id : 'testproject' )
}
end
describe 'show with git tags (regression test #27230)' do
it {
expect ( get ( '/projects/testproject/repository/sub?rev=mytags%2Ffoo&branch=&tag=mytags%2Ffoo' ) )
@ -71,6 +87,7 @@ describe RepositoriesController, type: :routing do
branch : '' ,
rev : 'mytags/foo' ,
tag : 'mytags/foo' ,
format : 'html' ,
project_id : 'testproject' )
}
it {
@ -80,6 +97,7 @@ describe RepositoriesController, type: :routing do
branch : 'master' ,
rev : 'FSubCommit-a' ,
tag : 'FSubCommit-a' ,
format : 'html' ,
project_id : 'testproject' )
}
it {
@ -88,6 +106,7 @@ describe RepositoriesController, type: :routing do
action : 'show' ,
path : 'sub' ,
rev : 'FSubCommit-a' ,
format : 'html' ,
project_id : 'testproject' )
}
end
@ -201,6 +220,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/browse/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'browse' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' )
}
@ -211,6 +231,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/entry/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'entry' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' )
}
@ -219,6 +240,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/revisions/2/entry/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'entry' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' ,
rev : '2' )
@ -249,6 +271,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/annotate/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'annotate' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' )
}
@ -256,6 +279,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/revisions/5/annotate/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'annotate' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' ,
rev : '5' )
@ -267,6 +291,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/changes/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'changes' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' )
}
@ -275,6 +300,7 @@ describe RepositoriesController, type: :routing do
expect ( get ( '/projects/testproject/repository/revisions/5/changes/path/to/file.c' ) )
. to route_to ( controller : 'repositories' ,
action : 'changes' ,
format : 'html' ,
project_id : 'testproject' ,
path : 'path/to/file.c' ,
rev : '5' )