additionals/test/functional/additionals_change_status_controller_test.rb

43 lines
1.1 KiB
Ruby
Raw Normal View History

2018-03-05 10:29:57 +01:00
require File.expand_path('../test_helper', __dir__)
2018-02-17 15:57:04 +01:00
class AdditionalsChangeStatusControllerTest < Redmine::ControllerTest
fixtures :projects,
:users, :email_addresses, :user_preferences,
:roles,
:members,
:member_roles,
:issues,
:issue_statuses,
:issue_relations,
:versions,
:trackers,
:projects_trackers,
:issue_categories,
:enabled_modules,
:enumerations,
:attachments,
:workflows,
:custom_fields,
:custom_values,
:custom_fields_projects,
:custom_fields_trackers,
:time_entries,
:journals,
:journal_details,
:queries
test 'assign new status to issue' do
session[:user_id] = 2
assert_difference('Journal.count') do
put :update, issue_id: 4, new_status_id: 3
end
end
test 'no update for issue, which already has same status' do
session[:user_id] = 2
assert_no_difference('Journal.count') do
put :update, issue_id: 2, new_status_id: 2
end
end
end