Project

General

Profile

Patch #33117 » 33117.patch

Go MAEDA, 2020-05-04 02:52

View differences:

app/controllers/users_controller.rb (作業コピー)
122 122
            attrs = {:generate_password => @user.generate_password }
123 123
            redirect_to new_user_path(:user => attrs)
124 124
          else
125
            redirect_to edit_user_path(@user)
125
            redirect_to users_path
126 126
          end
127 127
        }
128 128
        format.api  { render :action => 'show', :status => :created, :location => user_url(@user) }
test/functional/users_controller_test.rb (作業コピー)
282 282
    end
283 283

  
284 284
    user = User.order('id DESC').first
285
    assert_redirected_to :controller => 'users', :action => 'edit', :id => user.id
285
    assert_redirected_to :controller => 'users', :action => 'index'
286 286

  
287 287
    assert_equal 'John', user.firstname
288 288
    assert_equal 'Doe', user.lastname
    (1-1/1)