mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add post updates
This commit is contained in:
@@ -4,5 +4,6 @@ FactoryBot.define do
|
||||
user
|
||||
post
|
||||
parent { nil }
|
||||
is_post_update { false }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user