Revision 16849
Added by Jean-Philippe Lang about 8 years ago
sandbox/rails-5.1/test/integration/routing/repositories_test.rb | ||
---|---|---|
53 | 53 |
should_route 'GET /projects/foo/repository/revisions.atom' => 'repositories#revisions', :id => 'foo', :format => 'atom' |
54 | 54 | |
55 | 55 |
should_route 'GET /projects/foo/repository/revisions/2457' => 'repositories#revision', :id => 'foo', :rev => '2457' |
56 |
should_route 'GET /projects/foo/repository/revisions/2457/show' => 'repositories#show', :id => 'foo', :rev => '2457' |
|
57 |
should_route 'GET /projects/foo/repository/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :rev => '2457' |
|
56 |
should_route 'GET /projects/foo/repository/revisions/2457/show' => 'repositories#show', :id => 'foo', :rev => '2457', :format => 'html'
|
|
57 |
should_route 'GET /projects/foo/repository/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :rev => '2457', :format => 'html'
|
|
58 | 58 | |
59 | 59 |
should_route "GET /projects/foo/repository/revisions/2457/show/#{@path_hash[:path]}" => 'repositories#show', |
60 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
60 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
61 | 61 |
should_route "GET /projects/foo/repository/revisions/2457/diff/#{@path_hash[:path]}" => 'repositories#diff', |
62 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
62 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
63 | 63 |
should_route "GET /projects/foo/repository/revisions/2457/entry/#{@path_hash[:path]}" => 'repositories#entry', |
64 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
64 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
65 | 65 |
should_route "GET /projects/foo/repository/revisions/2457/raw/#{@path_hash[:path]}" => 'repositories#raw', |
66 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
66 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
67 | 67 |
should_route "GET /projects/foo/repository/revisions/2457/annotate/#{@path_hash[:path]}" => 'repositories#annotate', |
68 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
68 |
:id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
69 | 69 |
end |
70 | 70 | |
71 | 71 |
def test_repositories_revisions_with_repository_id |
... | ... | |
74 | 74 |
should_route 'GET /projects/foo/repository/foo/revisions.atom' => 'repositories#revisions', :id => 'foo', :repository_id => 'foo', :format => 'atom' |
75 | 75 | |
76 | 76 |
should_route 'GET /projects/foo/repository/foo/revisions/2457' => 'repositories#revision', :id => 'foo', :repository_id => 'foo', :rev => '2457' |
77 |
should_route 'GET /projects/foo/repository/foo/revisions/2457/show' => 'repositories#show', :id => 'foo', :repository_id => 'foo', :rev => '2457' |
|
78 |
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457' |
|
77 |
should_route 'GET /projects/foo/repository/foo/revisions/2457/show' => 'repositories#show', :id => 'foo', :repository_id => 'foo', :rev => '2457', :format => 'html'
|
|
78 |
should_route 'GET /projects/foo/repository/foo/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :repository_id => 'foo', :rev => '2457', :format => 'html'
|
|
79 | 79 | |
80 | 80 |
should_route "GET /projects/foo/repository/foo/revisions/2457/show/#{@path_hash[:path]}" => 'repositories#show', |
81 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
81 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
82 | 82 |
should_route "GET /projects/foo/repository/foo/revisions/2457/diff/#{@path_hash[:path]}" => 'repositories#diff', |
83 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
83 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
84 | 84 |
should_route "GET /projects/foo/repository/foo/revisions/2457/entry/#{@path_hash[:path]}" => 'repositories#entry', |
85 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
85 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
86 | 86 |
should_route "GET /projects/foo/repository/foo/revisions/2457/raw/#{@path_hash[:path]}" => 'repositories#raw', |
87 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
87 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
88 | 88 |
should_route "GET /projects/foo/repository/foo/revisions/2457/annotate/#{@path_hash[:path]}" => 'repositories#annotate', |
89 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param] |
|
89 |
:id => 'foo', :repository_id => 'foo', :rev => '2457', :path => @path_hash[:param], :format => 'html'
|
|
90 | 90 |
end |
91 | 91 | |
92 | 92 |
def test_repositories_non_revisions_path |
93 |
should_route 'GET /projects/foo/repository/changes' => 'repositories#changes', :id => 'foo' |
|
93 |
should_route 'GET /projects/foo/repository/changes' => 'repositories#changes', :id => 'foo', :format => 'html'
|
|
94 | 94 | |
95 | 95 |
should_route "GET /projects/foo/repository/changes/#{@path_hash[:path]}" => 'repositories#changes', |
96 |
:id => 'foo', :path => @path_hash[:param] |
|
96 |
:id => 'foo', :path => @path_hash[:param], :format => 'html'
|
|
97 | 97 |
should_route "GET /projects/foo/repository/diff/#{@path_hash[:path]}" => 'repositories#diff', |
98 |
:id => 'foo', :path => @path_hash[:param] |
|
98 |
:id => 'foo', :path => @path_hash[:param], :format => 'html'
|
|
99 | 99 |
should_route "GET /projects/foo/repository/browse/#{@path_hash[:path]}" => 'repositories#browse', |
100 |
:id => 'foo', :path => @path_hash[:param] |
|
100 |
:id => 'foo', :path => @path_hash[:param], :format => 'html'
|
|
101 | 101 |
should_route "GET /projects/foo/repository/entry/#{@path_hash[:path]}" => 'repositories#entry', |
102 |
:id => 'foo', :path => @path_hash[:param] |
|
102 |
:id => 'foo', :path => @path_hash[:param], :format => 'html'
|
|
103 | 103 |
should_route "GET /projects/foo/repository/raw/#{@path_hash[:path]}" => 'repositories#raw', |
104 |
:id => 'foo', :path => @path_hash[:param] |
|
104 |
:id => 'foo', :path => @path_hash[:param], :format => 'html'
|
|
105 | 105 |
should_route "GET /projects/foo/repository/annotate/#{@path_hash[:path]}" => 'repositories#annotate', |
106 |
:id => 'foo', :path => @path_hash[:param] |
|
106 |
:id => 'foo', :path => @path_hash[:param], :format => 'html'
|
|
107 | 107 |
end |
108 | 108 | |
109 | 109 |
def test_repositories_non_revisions_path_with_repository_id |
110 |
should_route 'GET /projects/foo/repository/svn/changes' => 'repositories#changes', :id => 'foo', :repository_id => 'svn' |
|
110 |
should_route 'GET /projects/foo/repository/svn/changes' => 'repositories#changes', :id => 'foo', :repository_id => 'svn', :format => 'html'
|
|
111 | 111 | |
112 | 112 |
should_route "GET /projects/foo/repository/svn/changes/#{@path_hash[:path]}" => 'repositories#changes', |
113 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param] |
|
113 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param], :format => 'html'
|
|
114 | 114 |
should_route "GET /projects/foo/repository/svn/diff/#{@path_hash[:path]}" => 'repositories#diff', |
115 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param] |
|
115 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param], :format => 'html'
|
|
116 | 116 |
should_route "GET /projects/foo/repository/svn/browse/#{@path_hash[:path]}" => 'repositories#browse', |
117 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param] |
|
117 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param], :format => 'html'
|
|
118 | 118 |
should_route "GET /projects/foo/repository/svn/entry/#{@path_hash[:path]}" => 'repositories#entry', |
119 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param] |
|
119 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param], :format => 'html'
|
|
120 | 120 |
should_route "GET /projects/foo/repository/svn/raw/#{@path_hash[:path]}" => 'repositories#raw', |
121 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param] |
|
121 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param], :format => 'html'
|
|
122 | 122 |
should_route "GET /projects/foo/repository/svn/annotate/#{@path_hash[:path]}" => 'repositories#annotate', |
123 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param] |
|
123 |
:id => 'foo', :repository_id => 'svn', :path => @path_hash[:param], :format => 'html'
|
|
124 | 124 |
end |
125 | 125 | |
126 | 126 |
def test_repositories_related_issues |
Also available in: Unified diff
Fixes repository routing tests.