1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-03 01:08:23 +09:00
mastodon/spec/models/form/admin_settings_spec.rb

21 lines
573 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Form::AdminSettings do
describe 'Validations' do
describe 'site_contact_username' do
context 'with no accounts' do
it { is_expected.to_not allow_value('Test').for(:site_contact_username) }
end
context 'with an account' do
before { Fabricate(:account, username: 'Glorp') }
it { is_expected.to_not allow_value('Test').for(:site_contact_username) }
it { is_expected.to allow_value('Glorp').for(:site_contact_username) }
end
end
end
end