+ get :edit, :session => { :user => user }
+ assert_response :success
+ assert_template "index"
+ end
+
+ # Test the right editor gets used when the URL has an override
+ def test_edit_with_override
+ get :edit, :params => { :editor => "id" }, :session => { :user => create(:user) }
+ assert_response :success
+ assert_template "edit"
+ assert_template :partial => "_id", :count => 1
+
+ get :edit, :params => { :editor => "potlatch2" }, :session => { :user => create(:user) }
+ assert_response :success
+ assert_template "edit"
+ assert_template :partial => "_potlatch2", :count => 1
+
+ get :edit, :params => { :editor => "potlatch" }, :session => { :user => create(:user) }
+ assert_response :success
+ assert_template "edit"
+ assert_template :partial => "_potlatch", :count => 1
+
+ get :edit, :params => { :editor => "remote" }, :session => { :user => create(:user) }