Commit 98559d91d2363170b97540c1561469a220513020
1 parent
02fb29ba
Exists in
master
and in
29 other branches
Using existing image; don't create it on the fly
Showing
2 changed files
with
3 additions
and
13 deletions
Show diff stats
test/functional/cms_controller_test.rb
... | ... | @@ -1058,19 +1058,14 @@ class CmsControllerTest < Test::Unit::TestCase |
1058 | 1058 | |
1059 | 1059 | should 'display pagination links of images' do |
1060 | 1060 | @controller.stubs(:per_page).returns(1) |
1061 | - fixture_filename = '/files/other-pic.jpg' | |
1062 | - filename = RAILS_ROOT + '/test/fixtures' + fixture_filename | |
1063 | - system('echo "image for test" | convert -background yellow -page 32x32 text:- %s' % filename) | |
1064 | - image = UploadedFile.create!(:profile => profile, :uploaded_data => fixture_file_upload(fixture_filename, 'image/jpg')) | |
1065 | 1061 | |
1062 | + image = UploadedFile.create!(:profile => profile, :uploaded_data => fixture_file_upload('/files/other-pic.jpg', 'image/jpg')) | |
1066 | 1063 | image2 = UploadedFile.create!(:profile => profile, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'), :created_at => 1.day.ago) |
1067 | 1064 | |
1068 | 1065 | get :media_listing, :profile => profile.identifier |
1069 | 1066 | |
1070 | 1067 | assert_includes assigns(:images), image |
1071 | 1068 | assert_not_includes assigns(:images), image2 |
1072 | - | |
1073 | - File.rm_f(filename) | |
1074 | 1069 | end |
1075 | 1070 | |
1076 | 1071 | should 'display pagination links of documents' do | ... | ... |
test/functional/content_viewer_controller_test.rb
... | ... | @@ -806,17 +806,12 @@ class ContentViewerControllerTest < Test::Unit::TestCase |
806 | 806 | @controller.stubs(:per_page).returns(1) |
807 | 807 | folder = Folder.create!(:name => 'gallery', :profile => profile, :view_as => 'image_gallery') |
808 | 808 | |
809 | - fixture_filename = '/files/other-pic.jpg' | |
810 | - filename = RAILS_ROOT + '/test/fixtures' + fixture_filename | |
811 | - system('echo "image for test" | convert -background yellow -page 32x32 text:- %s' % filename) | |
812 | - image1 = UploadedFile.create!(:profile => profile, :parent => folder, :uploaded_data => fixture_file_upload(fixture_filename, 'image/jpg')) | |
813 | - | |
809 | + image1 = UploadedFile.create!(:profile => profile, :parent => folder, :uploaded_data => fixture_file_upload('/files/other-pic.jpg', 'image/jpg')) | |
814 | 810 | image2 = UploadedFile.create!(:profile => profile, :parent => folder, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')) |
811 | + | |
815 | 812 | get :view_page, :profile => profile.identifier, :page => folder.explode_path, :slideshow => true |
816 | 813 | |
817 | 814 | assert_equal 2, assigns(:images).size |
818 | - | |
819 | - File.rm_f(filename) | |
820 | 815 | end |
821 | 816 | |
822 | 817 | should 'display source from article' do | ... | ... |