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