fixed tag and pending post tests, added category multiget helper to tag, post/unapproval/post version in progress still
This commit is contained in:
12
test/factories/post.rb
Normal file
12
test/factories/post.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
Factory.define(:post) do |f|
|
||||
f.md5 "abcd"
|
||||
f.uploader {|x| x.association(:user)}
|
||||
f.uploader_ip_addr "127.0.0.1"
|
||||
f.tag_string "tag1 tag2"
|
||||
f.tag_count 2
|
||||
f.tag_count_general 2
|
||||
f.file_ext "jpg"
|
||||
f.image_width 100
|
||||
f.image_height 200
|
||||
f.file_size 2000
|
||||
end
|
||||
@@ -8,3 +8,11 @@ end
|
||||
Factory.define(:artist_tag, :parent => :tag) do |f|
|
||||
f.category Tag.categories.artist
|
||||
end
|
||||
|
||||
Factory.define(:copyright_tag, :parent => :tag) do |f|
|
||||
f.category Tag.categories.copyright
|
||||
end
|
||||
|
||||
Factory.define(:character_tag, :parent => :tag) do |f|
|
||||
f.category Tag.categories.character
|
||||
end
|
||||
|
||||
@@ -2,6 +2,7 @@ Factory.define(:user) do |f|
|
||||
f.name {Faker::Name.first_name}
|
||||
f.password_hash {User.sha1("password")}
|
||||
f.email {Faker::Internet.email}
|
||||
f.default_image_size "medium"
|
||||
end
|
||||
|
||||
Factory.define(:banned_user, :parent => :user) do |f|
|
||||
|
||||
Reference in New Issue
Block a user