]> source.dussan.org Git - redmine.git/commitdiff
Reorder and rename test added in r19651 (#32973).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Apr 2020 08:22:39 +0000 (08:22 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Apr 2020 08:22:39 +0000 (08:22 +0000)
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@19652 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/timelog_controller_test.rb

index d989108157736a276ac6676e869a8131b3768e78..24dbc93321136ace4bddf2c7b5d8929531bd7833 100644 (file)
@@ -208,6 +208,21 @@ class TimelogControllerTest < Redmine::ControllerTest
     end
   end
 
+  def test_get_edit_for_other_user
+    Role.find_by_name('Manager').add_permission! :log_time_for_other_users
+    @request.session[:user_id] = 2
+
+    get :edit, :params => {
+      :id => 1
+    }
+
+    assert_response :success
+
+    assert_select 'select[name=?]', 'time_entry[user_id]' do
+      assert_select 'option[value="2"][selected=selected]'
+    end
+  end
+
   def test_post_create
     @request.session[:user_id] = 3
     assert_difference 'TimeEntry.count' do
@@ -1513,19 +1528,4 @@ class TimelogControllerTest < Redmine::ControllerTest
     assert_response :success
     assert_select "td.issue_cf_#{field.id}", :text => 'This is a long text'
   end
-
-  def test_edit_for_other_user
-    Role.find_by_name('Manager').add_permission! :log_time_for_other_users
-    @request.session[:user_id] = 2
-
-    get :edit, :params => {
-      :id => 1
-    }
-
-    assert_response :success
-
-    assert_select 'select[name=?]', 'time_entry[user_id]' do
-      assert_select 'option[value="2"][selected=selected]'
-    end
-  end
 end