ソースを参照

code clean up test/integration/issues_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18620 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Toshi MARUYAMA 4年前
コミット
6a4080e9e9
1個のファイルの変更4行の追加4行の削除
  1. 4
    4
      test/integration/issues_test.rb

+ 4
- 4
test/integration/issues_test.rb ファイルの表示

@@ -103,15 +103,16 @@ class IssuesTest < Redmine::IntegrationTest
def test_issue_attachments
log_user('jsmith', 'jsmith')
set_tmp_attachments_directory

attachment = new_record(Attachment) do
put '/issues/1', :params => {
:issue => {:notes => 'Some notes'},
:attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'This is an attachment'}}
:attachments => {
'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'),
'description' => 'This is an attachment'}
}
}
assert_redirected_to "/issues/1"
end

assert_equal Issue.find(1), attachment.container
assert_equal 'testfile.txt', attachment.filename
assert_equal 'This is an attachment', attachment.description
@@ -119,7 +120,6 @@ class IssuesTest < Redmine::IntegrationTest
assert_equal 59, attachment.filesize
# verify that the attachment was written to disk
assert File.exist?(attachment.diskfile)

# remove the attachments
Issue.find(1).attachments.each(&:destroy)
assert_equal 0, Issue.find(1).attachments.length

読み込み中…
キャンセル
保存