Fix broken option defaults in tootctl email-domain-blocks (#38107)

This commit is contained in:
Claire 2026-03-09 12:26:16 +01:00 committed by GitHub
parent 4211b1b34c
commit e235c446c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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')