"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/unit/attachment_test.rb" between
redmine-4.0.3.tar.gz and redmine-4.0.4.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

attachment_test.rb  (redmine-4.0.3):attachment_test.rb  (redmine-4.0.4)
skipping to change at line 447 skipping to change at line 447
def test_thumbnail_should_return_nil_if_generation_fails def test_thumbnail_should_return_nil_if_generation_fails
Redmine::Thumbnail.expects(:generate).raises(SystemCallError, 'Something w ent wrong') Redmine::Thumbnail.expects(:generate).raises(SystemCallError, 'Something w ent wrong')
set_fixtures_attachments_directory set_fixtures_attachments_directory
attachment = Attachment.find(16) attachment = Attachment.find(16)
assert_nil attachment.thumbnail assert_nil attachment.thumbnail
end end
else else
puts '(ImageMagick convert not available)' puts '(ImageMagick convert not available)'
end end
def test_is_text
js_attachment = Attachment.new(
:container => Issue.find(1),
:file => uploaded_test_file('hello.js', 'application/javascript'),
:author => User.find(1))
to_test = {
js_attachment => true, # hello.js (application/javascript)
attachments(:attachments_003) => false, # logo.gif (image/gif)
attachments(:attachments_004) => true, # source.rb (application/x-ruby)
attachments(:attachments_015) => true, # private.diff (text/x-diff)
attachments(:attachments_016) => false, # testfile.png (image/png)
to_test.each do |attachment, expected|
assert_equal expected, attachment.is_text?, attachment.inspect
end end
 End of changes. 1 change blocks. 
0 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)