Commit 38d0663544b360b7eb140f7ca32e92fd7cb8b5e0
1 parent
dfdfb106
Exists in
staging
and in
42 other branches
Removing url rewriter that makes lots of other tests break
Showing
2 changed files
with
6 additions
and
7 deletions
Show diff stats
test/functional/cms_controller_test.rb
| ... | ... | @@ -209,17 +209,17 @@ class CmsControllerTest < ActionController::TestCase |
| 209 | 209 | should 'redirect to cms after remove article from content management' do |
| 210 | 210 | a = profile.articles.build(:name => 'my-article') |
| 211 | 211 | a.save! |
| 212 | - @request.env['HTTP_REFERER'] = url_for :controller => 'cms', :profile => profile.identifier, :action => 'index' | |
| 212 | + @request.env['HTTP_REFERER'] = 'http://test.host/myprofile/testinguser/cms' | |
| 213 | 213 | post :destroy, :profile => profile.identifier, :id => a.id |
| 214 | - assert_redirected_to :controller => 'cms', :profile => profile.identifier, :action => 'index' | |
| 214 | + assert_redirected_to :controller => 'cms', :action => 'index', :profile => profile.identifier | |
| 215 | 215 | end |
| 216 | 216 | |
| 217 | 217 | should 'redirect to blog after remove article from content viewer' do |
| 218 | 218 | a = profile.articles.build(:name => 'my-article') |
| 219 | 219 | a.save! |
| 220 | - @request.env['HTTP_REFERER'] = url_for :controller => 'content_viewer', :action => 'view_page' | |
| 220 | + @request.env['HTTP_REFERER'] = 'http://colivre.net/testinguser' | |
| 221 | 221 | post :destroy, :profile => profile.identifier, :id => a.id |
| 222 | - assert_redirected_to :controller => 'content_viewer', :action => 'view_page' | |
| 222 | + assert_redirected_to :controller => 'content_viewer', :action => 'view_page', :profile => profile.identifier, :page => [], :host => profile.environment.default_hostname | |
| 223 | 223 | end |
| 224 | 224 | |
| 225 | 225 | should 'be able to acess Rss feed creation page' do | ... | ... |
test/test_helper.rb
| ... | ... | @@ -256,9 +256,8 @@ module NoosferoTestHelper |
| 256 | 256 | def will_paginate(arg1, arg2) |
| 257 | 257 | end |
| 258 | 258 | |
| 259 | - def url_for *args | |
| 260 | - url = ActionController::UrlRewriter.new(@request, nil) | |
| 261 | - url.rewrite *args | |
| 259 | + def url_for(args = {}) | |
| 260 | + args | |
| 262 | 261 | end |
| 263 | 262 | |
| 264 | 263 | def javascript_tag(any) | ... | ... |