Remove unneeded settings cleanup from specs (#28425)
This commit is contained in:
parent
c7c727994a
commit
6fed0fcbaa
15 changed files with 8 additions and 189 deletions
|
@ -4,12 +4,6 @@ require 'rails_helper'
|
|||
|
||||
RSpec.describe 'Activity' do
|
||||
describe 'GET /api/v1/instance/activity' do
|
||||
around do |example|
|
||||
original = Setting.activity_api_enabled
|
||||
example.run
|
||||
Setting.activity_api_enabled = original
|
||||
end
|
||||
|
||||
context 'with activity api enabled' do
|
||||
before { Setting.activity_api_enabled = true }
|
||||
|
||||
|
|
|
@ -4,12 +4,6 @@ require 'rails_helper'
|
|||
|
||||
RSpec.describe 'Domain Blocks' do
|
||||
describe 'GET /api/v1/instance/domain_blocks' do
|
||||
around do |example|
|
||||
original = Setting.show_domain_blocks
|
||||
example.run
|
||||
Setting.show_domain_blocks = original
|
||||
end
|
||||
|
||||
before do
|
||||
Fabricate(:domain_block)
|
||||
end
|
||||
|
|
|
@ -4,12 +4,6 @@ require 'rails_helper'
|
|||
|
||||
RSpec.describe 'Peers' do
|
||||
describe 'GET /api/v1/instance/peers' do
|
||||
around do |example|
|
||||
original = Setting.peers_api_enabled
|
||||
example.run
|
||||
Setting.peers_api_enabled = original
|
||||
end
|
||||
|
||||
context 'with peers api enabled' do
|
||||
before { Setting.peers_api_enabled = true }
|
||||
|
||||
|
|
|
@ -242,17 +242,11 @@ describe 'Caching behavior' do
|
|||
end
|
||||
|
||||
describe '/api/v1/instance/domain_blocks' do
|
||||
around do |example|
|
||||
old_setting = Setting.show_domain_blocks
|
||||
before do
|
||||
Setting.show_domain_blocks = show_domain_blocks
|
||||
|
||||
example.run
|
||||
|
||||
Setting.show_domain_blocks = old_setting
|
||||
get '/api/v1/instance/domain_blocks'
|
||||
end
|
||||
|
||||
before { get '/api/v1/instance/domain_blocks' }
|
||||
|
||||
context 'when set to be publicly-available' do
|
||||
let(:show_domain_blocks) { 'all' }
|
||||
|
||||
|
@ -365,16 +359,8 @@ describe 'Caching behavior' do
|
|||
end
|
||||
|
||||
describe '/api/v1/instance/domain_blocks' do
|
||||
around do |example|
|
||||
old_setting = Setting.show_domain_blocks
|
||||
Setting.show_domain_blocks = show_domain_blocks
|
||||
|
||||
example.run
|
||||
|
||||
Setting.show_domain_blocks = old_setting
|
||||
end
|
||||
|
||||
before do
|
||||
Setting.show_domain_blocks = show_domain_blocks
|
||||
get '/api/v1/instance/domain_blocks', headers: { 'Authorization' => "Bearer #{token.token}" }
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue