set language en at test_put_update_with_spent_time_and_failure_should_not_add_spent_time at functional issues controller test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10623 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3bda16f825
commit
e04bd297e0
|
@ -2872,22 +2872,23 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_put_update_with_spent_time_and_failure_should_not_add_spent_time
|
def test_put_update_with_spent_time_and_failure_should_not_add_spent_time
|
||||||
|
with_settings :default_language => "en" do
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
|
|
||||||
assert_no_difference('TimeEntry.count') do
|
assert_no_difference('TimeEntry.count') do
|
||||||
put :update,
|
put :update,
|
||||||
:id => 1,
|
:id => 1,
|
||||||
:issue => { :subject => '' },
|
:issue => { :subject => '' },
|
||||||
:time_entry => { :hours => '2.5', :comments => 'should not be added', :activity_id => TimeEntryActivity.first.id }
|
:time_entry => { :hours => '2.5', :comments => 'should not be added',
|
||||||
|
:activity_id => TimeEntryActivity.first.id }
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_select 'input[name=?][value=?]', 'time_entry[hours]', '2.5'
|
assert_select 'input[name=?][value=?]', 'time_entry[hours]', '2.5'
|
||||||
assert_select 'input[name=?][value=?]', 'time_entry[comments]', 'should not be added'
|
assert_select 'input[name=?][value=?]', 'time_entry[comments]', 'should not be added'
|
||||||
assert_select 'select[name=?]', 'time_entry[activity_id]' do
|
assert_select 'select[name=?]', 'time_entry[activity_id]' do
|
||||||
assert_select 'option[value=?][selected=selected]', TimeEntryActivity.first.id
|
assert_select 'option[value=?][selected=selected]', TimeEntryActivity.first.id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_put_update_with_attachment_only
|
def test_put_update_with_attachment_only
|
||||||
set_tmp_attachments_directory
|
set_tmp_attachments_directory
|
||||||
|
|
Loading…
Reference in New Issue