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