summaryrefslogtreecommitdiffstats
path: root/test/functional/issues_controller_transaction_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
commitec31b616982f137abdee8d0c6aa9dc4a6d103189 (patch)
treee4f5dc564be2b4ce5047a1f5acb2790fdc3b70ca /test/functional/issues_controller_transaction_test.rb
parent1db54e228d98d20536133bf52a8af0ce67616dc3 (diff)
downloadredmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.tar.gz
redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.zip
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_transaction_test.rb')
-rw-r--r--test/functional/issues_controller_transaction_test.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/functional/issues_controller_transaction_test.rb b/test/functional/issues_controller_transaction_test.rb
index d7e9c4cb5..161ce8bc2 100644
--- a/test/functional/issues_controller_transaction_test.rb
+++ b/test/functional/issues_controller_transaction_test.rb
@@ -68,7 +68,6 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
end
assert_response :success
- assert_template 'edit'
assert_select 'div.conflict'
assert_select 'input[name=?][value=?]', 'conflict_resolution', 'overwrite'
@@ -101,7 +100,7 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
end
assert_response :success
- assert_template 'edit'
+
attachment = Attachment.order('id DESC').first
assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token
assert_select 'input[name=?][value=?]', 'attachments[p0][filename]', 'testfile.txt'
@@ -117,6 +116,7 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
:notes => '',
:lock_version => (issue.lock_version - 1)
}
+ assert_response :success
assert_select 'div.conflict'
assert_select 'input[name=conflict_resolution][value=overwrite]'
@@ -134,11 +134,9 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
:lock_version => 2
},
:last_journal_id => 1
+ assert_response :success
- assert_not_nil assigns(:conflict_journals)
- assert_equal 1, assigns(:conflict_journals).size
- assert_equal 2, assigns(:conflict_journals).first.id
-
+ assert_select '.conflict-journal', 1
assert_select 'div.conflict', :text => /Some notes with Redmine links/
end
@@ -152,9 +150,9 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
:lock_version => 2
},
:last_journal_id => ''
+ assert_response :success
- assert_not_nil assigns(:conflict_journals)
- assert_equal 2, assigns(:conflict_journals).size
+ assert_select '.conflict-journal', 2
assert_select 'div.conflict', :text => /Some notes with Redmine links/
assert_select 'div.conflict', :text => /Journal notes/
end
@@ -164,11 +162,13 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest
@request.session[:user_id] = 2
put :update, :id => 1, :issue => {:fixed_version_id => 4, :lock_version => 2}, :last_journal_id => ''
- assert_include journal, assigns(:conflict_journals)
+ assert_response :success
+ assert_select '.conflict-journal', :text => /Privates notes/
Role.find(1).remove_permission! :view_private_notes
put :update, :id => 1, :issue => {:fixed_version_id => 4, :lock_version => 2}, :last_journal_id => ''
- assert_not_include journal, assigns(:conflict_journals)
+ assert_response :success
+ assert_select '.conflict-journal', :text => /Privates notes/, :count => 0
end
def test_update_stale_issue_with_overwrite_conflict_resolution_should_update