major bug fix with cache.rb, work on implication tests

This commit is contained in:
albert
2010-02-12 15:17:15 -05:00
parent ba05f727b0
commit bc7bd0b386
15 changed files with 206 additions and 520 deletions

View File

@@ -8,18 +8,18 @@ Factory.define(:upload) do |f|
f.status "pending"
end
Factory.define(:downloadable_upload, :parent => :upload) do |f|
Factory.define(:source_upload, :parent => :upload) do |f|
f.source "http://www.google.com/intl/en_ALL/images/logo.gif"
end
Factory.define(:uploaded_jpg_upload, :parent => :upload) do |f|
Factory.define(:jpg_upload, :parent => :upload) do |f|
f.file_path do
FileUtils.cp("#{Rails.root}/test/files/test.jpg", "#{Rails.root}/tmp")
"#{Rails.root}/tmp/test.jpg"
end
end
Factory.define(:uploaded_large_jpg_upload, :parent => :upload) do |f|
Factory.define(:large_jpg_upload, :parent => :upload) do |f|
f.file_ext "jpg"
f.content_type "image/jpeg"
f.file_path do
@@ -28,14 +28,14 @@ Factory.define(:uploaded_large_jpg_upload, :parent => :upload) do |f|
end
end
Factory.define(:uploaded_png_upload, :parent => :upload) do |f|
Factory.define(:png_upload, :parent => :upload) do |f|
f.file_path do
FileUtils.cp("#{Rails.root}/test/files/test.png", "#{Rails.root}/tmp")
"#{Rails.root}/tmp/test.png"
end
end
Factory.define(:uploaded_gif_upload, :parent => :upload) do |f|
Factory.define(:gif_upload, :parent => :upload) do |f|
f.file_path do
FileUtils.cp("#{Rails.root}/test/files/test.gif", "#{Rails.root}/tmp")
"#{Rails.root}/tmp/test.gif"