mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 22:31:36 +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
|