major bug fix with cache.rb, work on implication tests
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
require 'fileutils'
|
||||
|
||||
Factory.define(:pending_post) do |f|
|
||||
f.rating "s"
|
||||
f.uploader {|x| x.association(:user)}
|
||||
f.uploader_ip_addr "127.0.0.1"
|
||||
f.tag_string "special"
|
||||
f.status "pending"
|
||||
end
|
||||
|
||||
Factory.define(:downloadable_pending_post, :parent => :pending_post) do |f|
|
||||
f.source "http://www.google.com/intl/en_ALL/images/logo.gif"
|
||||
end
|
||||
|
||||
Factory.define(:uploaded_jpg_pending_post, :parent => :pending_post) 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_pending_post, :parent => :pending_post) do |f|
|
||||
f.file_ext "jpg"
|
||||
f.content_type "image/jpeg"
|
||||
f.file_path do
|
||||
FileUtils.cp("#{Rails.root}/test/files/test-large.jpg", "#{Rails.root}/tmp")
|
||||
"#{Rails.root}/tmp/test-large.jpg"
|
||||
end
|
||||
end
|
||||
|
||||
Factory.define(:uploaded_png_pending_post, :parent => :pending_post) 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_pending_post, :parent => :pending_post) do |f|
|
||||
f.file_path do
|
||||
FileUtils.cp("#{Rails.root}/test/files/test.gif", "#{Rails.root}/tmp")
|
||||
"#{Rails.root}/tmp/test.gif"
|
||||
end
|
||||
end
|
||||
5
test/factories/tag_implication.rb
Normal file
5
test/factories/tag_implication.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
Factory.define(:tag_implication) do |f|
|
||||
f.creator {|x| x.association(:user)}
|
||||
f.updater_id {|x| x.creator_id}
|
||||
f.updater_ip_addr "127.0.0.1"
|
||||
end
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user