mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
* It is now possible to follow a post in order to receive updates about it * Notifications are now sent when updates are published * Post status changes are now tracked * Update sidebar now shows the post status history * Mark a comment as a post update using the comment form * ... more ...
25 lines
579 B
Ruby
25 lines
579 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe PostStatusChange, type: :model do
|
|
let(:post_status_change) { FactoryBot.build(:post_status_change) }
|
|
|
|
it 'should be valid' do
|
|
expect(post_status_change).to be_valid
|
|
end
|
|
|
|
it 'must have a post' do
|
|
post_status_change.post = nil
|
|
expect(post_status_change).to be_invalid
|
|
end
|
|
|
|
it 'must have a user' do
|
|
post_status_change.user = nil
|
|
expect(post_status_change).to be_invalid
|
|
end
|
|
|
|
it 'can have a null post status' do
|
|
post_status_change.post_status = nil
|
|
expect(post_status_change).to be_valid
|
|
end
|
|
end
|