mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-12 01:05:37 -05:00
Add coverage for email subscription account controls (#39333)
This commit is contained in:
26
spec/requests/admin/email_subscriptions/accounts_spec.rb
Normal file
26
spec/requests/admin/email_subscriptions/accounts_spec.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Admin Email Subscriptions Accounts' do
|
||||
let(:user) { Fabricate(:admin_user) }
|
||||
let(:account) { Fabricate :account }
|
||||
|
||||
before { sign_in user }
|
||||
|
||||
context 'when feature is disabled' do
|
||||
around do |example|
|
||||
original = Rails.application.config.x.email_subscriptions
|
||||
Rails.application.config.x.email_subscriptions = false
|
||||
example.run
|
||||
Rails.application.config.x.email_subscriptions = original
|
||||
end
|
||||
|
||||
it 'returns not found' do
|
||||
get admin_email_subscriptions_account_path(account.id)
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user