X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6e3d183c40a6b5c0d01352531e00d577e314c98c..21d60e359a6e972731e0385c51dd86536b7ea777:/test/controllers/site_controller_test.rb diff --git a/test/controllers/site_controller_test.rb b/test/controllers/site_controller_test.rb index 01c1f3a22..7fa558e78 100644 --- a/test/controllers/site_controller_test.rb +++ b/test/controllers/site_controller_test.rb @@ -199,6 +199,28 @@ class SiteControllerTest < ActionController::TestCase assert_template "index" end + # Test the right editor gets used when the URL has an override + def test_edit_with_override + get :edit, { :editor => "id" }, { :user => users(:public_user).id } + assert_response :success + assert_template "edit" + assert_template :partial => "_id", :count => 1 + + get :edit, { :editor => "potlatch2" }, { :user => users(:public_user).id } + assert_response :success + assert_template "edit" + assert_template :partial => "_potlatch2", :count => 1 + + get :edit, { :editor => "potlatch" }, { :user => users(:public_user).id } + assert_response :success + assert_template "edit" + assert_template :partial => "_potlatch", :count => 1 + + get :edit, { :editor => "remote" }, { :user => users(:public_user).id } + assert_response :success + assert_template "index" + end + # Test editing a specific node def test_edit_with_node user = users(:public_user)