Add circle posts history support (#18)
* Wip: make web backend * Wip: keep statuses if edit circle * Wip: Add circle history page and record circle posts * Add circle post to history in web ui when post * Add test
This commit is contained in:
parent
0a42f4b7e2
commit
df3b3f4185
19 changed files with 544 additions and 15 deletions
|
@ -103,4 +103,27 @@ RSpec.describe ProcessMentionsService, type: :service do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with circle post' do
|
||||
let(:status) { Fabricate(:status, account: account) }
|
||||
let(:circle) { Fabricate(:circle, account: account) }
|
||||
let(:follower) { Fabricate(:account) }
|
||||
let(:other) { Fabricate(:account) }
|
||||
|
||||
before do
|
||||
follower.follow!(account)
|
||||
other.follow!(account)
|
||||
circle.accounts << follower
|
||||
described_class.new.call(status, limited_type: :circle, circle: circle)
|
||||
end
|
||||
|
||||
it 'remains circle post on history' do
|
||||
expect(CircleStatus.exists?(circle_id: circle.id, status_id: status.id)).to be true
|
||||
end
|
||||
|
||||
it 'post is delivered to circle members' do
|
||||
expect(status.mentioned_accounts.count).to eq 1
|
||||
expect(status.mentioned_accounts.first.id).to eq follower.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue