fix tests

This commit is contained in:
r888888888
2015-08-18 17:37:07 -07:00
parent 66de9c85a3
commit 341b29ce41
32 changed files with 3205 additions and 3223 deletions

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory(:artist_url) do
artist
url {Faker::Internet.domain_name}
url {FFaker::Internet.domain_name}
end
end

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory(:ban) do |f|
reason {Faker::Lorem.words.join(" ")}
reason {FFaker::Lorem.words.join(" ")}
duration 60
end
end

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory(:comment) do |f|
post
body {Faker::Lorem.sentences.join(" ")}
body {FFaker::Lorem.sentences.join(" ")}
end
end

View File

@@ -1,7 +1,7 @@
FactoryGirl.define do
factory(:dmail) do
to :factory => :user
title {Faker::Lorem.words.join(" ")}
body {Faker::Lorem.sentences.join(" ")}
title {FFaker::Lorem.words.join(" ")}
body {FFaker::Lorem.sentences.join(" ")}
end
end

View File

@@ -1,5 +1,5 @@
FactoryGirl.define do
factory(:forum_post) do
body {Faker::Lorem.sentences.join(" ")}
body {FFaker::Lorem.sentences.join(" ")}
end
end

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory(:forum_topic) do
title {Faker::Lorem.words.join(" ")}
title {FFaker::Lorem.words.join(" ")}
is_sticky false
is_locked false
category_id 0

View File

@@ -1,7 +1,7 @@
FactoryGirl.define do
factory(:ip_ban) do
creator :factory => :user
reason {Faker::Lorem.words.join(" ")}
reason {FFaker::Lorem.words.join(" ")}
ip_addr "127.0.0.1"
end
end

View File

@@ -7,7 +7,7 @@ FactoryGirl.define do
width 1
height 1
is_active true
body {Faker::Lorem.sentences.join(" ")}
body {FFaker::Lorem.sentences.join(" ")}
updater_id :factory => :user
updater_ip_addr "127.0.0.1"
end

View File

@@ -2,6 +2,6 @@ FactoryGirl.define do
factory(:pool) do
name {(rand(1_000_000) + 100).to_s}
association :creator, :factory => :user
description {Faker::Lorem.sentences.join(" ")}
description {FFaker::Lorem.sentences.join(" ")}
end
end

View File

@@ -1,6 +1,8 @@
FactoryGirl.define do
factory(:post) do
md5 {|x| Time.now.to_f.to_s}
sequence :md5 do |n|
n.to_s
end
uploader :factory => :user
uploader_ip_addr "127.0.0.1"
tag_string "tag1 tag2"

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory(:tag) do
name {"#{Faker::Name.first_name.downcase}#{rand(1000)}"}
name {"#{FFaker::Name.first_name.downcase}#{rand(1000)}"}
post_count 0
category {Tag.categories.general}
related_tags ""

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory(:tag_subscription) do
name {Faker::Lorem.words.join(" ")}
name {FFaker::Lorem.words.join(" ")}
is_public true
tag_query "aaa"
end

View File

@@ -3,7 +3,7 @@ FactoryGirl.define do
name {(rand(1_000_000) + 10).to_s}
password "password"
password_hash {User.sha1("password")}
email {Faker::Internet.email}
email {FFaker::Internet.email}
default_image_size "large"
base_upload_limit 10
level 20

View File

@@ -2,6 +2,6 @@ FactoryGirl.define do
factory(:user_feedback) do
user
category "positive"
body {Faker::Lorem.words.join(" ")}
body {FFaker::Lorem.words.join(" ")}
end
end

View File

@@ -1,7 +1,7 @@
FactoryGirl.define do
factory(:wiki_page) do
creator :factory => :user
title {Faker::Lorem.words.join(" ")}
body {Faker::Lorem.sentences.join(" ")}
title {FFaker::Lorem.words.join(" ")}
body {FFaker::Lorem.sentences.join(" ")}
end
end