* Wip * Wip * Wip: History * Wip: テストコード作成 * Fix test * Wip * Wip * Wip * Fix test * Wip * Wip * Wip * Wip * なんとか完成、これから動作確認 * spell miss * Change ng rule timings * Fix test * Wip * Fix test * Wip * Fix form * 表示まわりの改善
This commit is contained in:
parent
0779c748a6
commit
7d96d5828e
56 changed files with 2062 additions and 42 deletions
|
@ -111,6 +111,38 @@ RSpec.describe ActivityPub::Activity::Announce do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when ng rule is existing' do
|
||||
context 'when ng rule is match' do
|
||||
before do
|
||||
Fabricate(:ng_rule, account_domain: 'example.com', reaction_type: ['reblog'])
|
||||
subject.perform
|
||||
end
|
||||
|
||||
let(:object_json) do
|
||||
ActivityPub::TagManager.instance.uri_for(status)
|
||||
end
|
||||
|
||||
it 'does not create a reblog by sender of status' do
|
||||
expect(sender.reblogged?(status)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context 'when ng rule is not match' do
|
||||
before do
|
||||
Fabricate(:ng_rule, account_domain: 'foo.bar', reaction_type: ['reblog'])
|
||||
subject.perform
|
||||
end
|
||||
|
||||
let(:object_json) do
|
||||
ActivityPub::TagManager.instance.uri_for(status)
|
||||
end
|
||||
|
||||
it 'creates a reblog by sender of status' do
|
||||
expect(sender.reblogged?(status)).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the sender is relayed' do
|
||||
subject { described_class.new(json, sender, relayed_through_actor: relay_account) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue