]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/3419'
authorTom Hughes <tom@compton.nu>
Thu, 3 Feb 2022 18:37:12 +0000 (18:37 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 3 Feb 2022 18:37:12 +0000 (18:37 +0000)
1  2 
config/locales/en.yml
test/controllers/users_controller_test.rb

diff --combined config/locales/en.yml
index 12cb1ebd2af4efea04d68121dfe41e981e022481,95d2e721976fc59008a46bb317f2c510882572ba..2cbc8091800c1106b0bdc828890ec1651d30c6a9
@@@ -1143,7 -1143,6 +1143,7 @@@ en
            "yes": "Place"
          railway:
            abandoned: "Abandoned Railway"
 +          buffer_stop: "Buffer Stop"
            construction: "Railway under Construction"
            disused: "Disused Railway"
            funicular: "Funicular Railway"
            platform: "Railway Platform"
            preserved: "Preserved Railway"
            proposed: "Proposed Railway"
 +          rail: "Rail"
            spur: "Railway Spur"
            station: "Railway Station"
            stop: "Railway Stop"
            switch: "Railway Points"
            tram: "Tramway"
            tram_stop: "Tram Stop"
 +          turntable: "Turntable"
            yard: "Railway Yard"
          shop:
            agrarian: "Agrarian Shop"
        activate_user: "Activate this User"
        deactivate_user: "Deactivate this User"
        confirm_user: "Confirm this User"
+       unconfirm_user: "Unconfirm this User"
+       unsuspend_user: "Unsuspend this User"
        hide_user: "Hide this User"
        unhide_user: "Unhide this User"
        delete_user: "Delete this User"
index e979e5f6db69169ceb091c99fa8d257744f2eeca,97efec82b4d8599ebb0abc6005dafe4fb8c29582..7a487780d20059e41e14f5b45200db7af9095a0a
@@@ -547,39 -547,39 +547,39 @@@ class UsersControllerTest < ActionDispa
      user = create(:user)
  
      # Try without logging in
-     post set_status_user_path(user), :params => { :status => "suspended" }
+     post set_status_user_path(user), :params => { :event => "confirm" }
      assert_response :forbidden
  
      # Now try as a normal user
      session_for(user)
-     post set_status_user_path(user), :params => { :status => "suspended" }
+     post set_status_user_path(user), :params => { :event => "confirm" }
      assert_response :redirect
      assert_redirected_to :controller => :errors, :action => :forbidden
  
      # Finally try as an administrator
      session_for(create(:administrator_user))
-     post set_status_user_path(user), :params => { :status => "suspended" }
+     post set_status_user_path(user), :params => { :event => "confirm" }
      assert_response :redirect
      assert_redirected_to :action => :show, :display_name => user.display_name
-     assert_equal "suspended", User.find(user.id).status
+     assert_equal "confirmed", User.find(user.id).status
    end
  
    def test_destroy
      user = create(:user, :home_lat => 12.1, :home_lon => 12.1, :description => "test")
  
      # Try without logging in
 -    delete user_path(user), :params => { :status => "suspended" }
 +    delete user_path(user)
      assert_response :forbidden
  
      # Now try as a normal user
      session_for(user)
 -    delete user_path(user), :params => { :status => "suspended" }
 +    delete user_path(user)
      assert_response :redirect
      assert_redirected_to :controller => :errors, :action => :forbidden
  
      # Finally try as an administrator
      session_for(create(:administrator_user))
 -    delete user_path(user), :params => { :status => "suspended" }
 +    delete user_path(user)
      assert_response :redirect
      assert_redirected_to :action => :show, :display_name => user.display_name