fix error

This commit is contained in:
yafeilee 2019-04-22 22:07:17 +08:00
parent 0bc4493710
commit 46653b9154
4 changed files with 12 additions and 12 deletions

View File

@ -1,14 +1,14 @@
FactoryBot.define do FactoryBot.define do
factory :comment do factory :comment do
content 'content' * 10 content { 'content' * 10 }
name 'commentor' name { 'commentor' }
email 'tester@xx.com' email { 'tester@xx.com' }
association :post association :post
end end
factory :comment_no_post, class: Comment do factory :comment_no_post, class: Comment do
content 'content' * 10 content { 'content' * 10 }
name 'commentor' name { 'commentor' }
email 'tester@xx.com' email { 'tester@xx.com' }
end end
end end

View File

@ -1,5 +1,5 @@
FactoryBot.define do FactoryBot.define do
factory :label do factory :label do
name 'label' name { 'label' }
end end
end end

View File

@ -1,12 +1,12 @@
FactoryBot.define do FactoryBot.define do
factory :post do factory :post do
title 'this is a post title' title { 'this is a post title' }
content 'content' * 10 content { 'content' * 10 }
end end
factory :post_list, class: Post do factory :post_list, class: Post do
sequence(:title) { |n| "#{n}: post title" } sequence(:title) { |n| "#{n}: post title" }
content 'content' * 10 content { 'content' * 10 }
sequence(:created_at) { |n| n.days.ago } sequence(:created_at) { |n| n.days.ago }
end end
end end

View File

@ -2,7 +2,7 @@
FactoryBot.define do FactoryBot.define do
factory :subscribe do factory :subscribe do
email "tester@mail.com" email { "tester@mail.com" }
enable false enable { false }
end end
end end