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
factory :comment do
content 'content' * 10
name 'commentor'
email 'tester@xx.com'
content { 'content' * 10 }
name { 'commentor' }
email { 'tester@xx.com' }
association :post
end
factory :comment_no_post, class: Comment do
content 'content' * 10
name 'commentor'
email 'tester@xx.com'
content { 'content' * 10 }
name { 'commentor' }
email { 'tester@xx.com' }
end
end

View File

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

View File

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

View File

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