mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 18:45:41 +01:00
20 lines
573 B
Ruby
20 lines
573 B
Ruby
# 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
|