Add post updates

This commit is contained in:
riggraz
2019-10-01 19:15:03 +02:00
parent be8f003d70
commit 034a5ab708
12 changed files with 113 additions and 1 deletions

View File

@@ -4,5 +4,6 @@ FactoryBot.define do
user
post
parent { nil }
is_post_update { false }
end
end

View File

@@ -41,4 +41,10 @@ RSpec.describe Comment, type: :model do
expect(parent.children.length).to eq(2)
end
it 'has a flag to tell if it is a post update that defaults to false' do
comment = Comment.new
expect(comment.is_post_update).to be_falsy
end
end