mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-08-21 07:44:37 +00:00
* No need to re-require sidekiq plugins, they are required via Gemfile * Add derailed_benchmarks tool, no need to require TTY gems in Gemfile * Replace ruby-oembed with FetchOEmbedService Reduce startup by 45382 allocated objects * Remove preloaded JSON-LD in favour of caching HTTP responses Reduce boot RAM by about 6 MiB * Fix tests * Fix test suite by stubbing out JSON-LD contexts
20 lines
567 B
Ruby
20 lines
567 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe BlockDomainFromAccountService, type: :service do
|
|
let!(:wolf) { Fabricate(:account, username: 'wolf', domain: 'evil.org') }
|
|
let!(:alice) { Fabricate(:account, username: 'alice') }
|
|
|
|
subject { BlockDomainFromAccountService.new }
|
|
|
|
it 'creates domain block' do
|
|
subject.call(alice, 'evil.org')
|
|
expect(alice.domain_blocking?('evil.org')).to be true
|
|
end
|
|
|
|
it 'purge followers from blocked domain' do
|
|
wolf.follow!(alice)
|
|
subject.call(alice, 'evil.org')
|
|
expect(wolf.following?(alice)).to be false
|
|
end
|
|
end
|