Skip to content

Commit

Permalink
Fix render :location => ... test.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed May 18, 2007
1 parent e48b062 commit f7bb3dd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions actionpack/test/controller/new_render_test.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,10 @@
require File.dirname(__FILE__) + '/../abstract_unit' require File.dirname(__FILE__) + '/../abstract_unit'


silence_warnings { Customer = Struct.new(:name, :id) } class Customer < Struct.new(:name, :id)
def to_param
id.to_s
end
end


class CustomersController < ActionController::Base class CustomersController < ActionController::Base
end end
Expand Down Expand Up @@ -780,8 +784,8 @@ def test_rendering_with_object_location_should_set_header_with_url_for
map.resources :customers map.resources :customers
map.connect ':controller/:action/:id' map.connect ':controller/:action/:id'
end end

get :render_with_object_location get :render_with_object_location
assert_equal "http://test.host/customers/1", @response.headers["Location"] assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"]
end end
end end

0 comments on commit f7bb3dd

Please sign in to comment.