mirror of
https://github.com/mastodon/mastodon.git
synced 2026-03-14 22:44:08 +00:00
Fix broken option defaults in tootctl email-domain-blocks (#38107)
This commit is contained in:
parent
4211b1b34c
commit
e235c446c9
|
|
@ -5,7 +5,7 @@ require_relative 'base'
|
|||
|
||||
module Mastodon::CLI
|
||||
class EmailDomainBlocks < Base
|
||||
option :only_blocked, type: :boolean, defaut: false
|
||||
option :only_blocked, type: :boolean, default: false
|
||||
option :only_with_approval, type: :boolean, default: false
|
||||
desc 'list', 'List blocked e-mail domains'
|
||||
long_desc <<-LONG_DESC
|
||||
|
|
@ -43,7 +43,7 @@ module Mastodon::CLI
|
|||
end
|
||||
|
||||
option :with_dns_records, type: :boolean
|
||||
option :allow_with_approval, type: :boolean, defaut: false
|
||||
option :allow_with_approval, type: :boolean, default: false
|
||||
desc 'add DOMAIN...', 'Block e-mail domain(s)'
|
||||
long_desc <<-LONG_DESC
|
||||
Blocking an e-mail domain prevents users from signing up
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ RSpec.describe Mastodon::CLI::EmailDomainBlocks do
|
|||
context 'when no blocks exist' do
|
||||
let(:domain) { 'host.example' }
|
||||
let(:arguments) { [domain] }
|
||||
let(:options) { { allow_with_approval: false } }
|
||||
|
||||
it 'adds a new block' do
|
||||
expect { subject }
|
||||
|
|
@ -113,7 +112,7 @@ RSpec.describe Mastodon::CLI::EmailDomainBlocks do
|
|||
context 'with --with-dns-records true' do
|
||||
let(:domain) { 'host.example' }
|
||||
let(:arguments) { [domain] }
|
||||
let(:options) { { allow_with_approval: false, with_dns_records: true } }
|
||||
let(:options) { { with_dns_records: true } }
|
||||
|
||||
before do
|
||||
configure_mx(domain: domain, exchange: 'other.host')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user