1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-13 22:28:23 +09:00
mastodon/spec/system/admin/settings/branding_spec.rb
2024-09-04 05:12:25 +00:00

38 lines
904 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'Admin::Settings::Branding' do
it 'Saves changes to branding settings' do
sign_in admin_user
visit admin_settings_branding_path
fill_in short_description_field,
with: 'new key value'
fill_in site_contact_email_field,
with: User.last.email
fill_in site_contact_username_field,
with: Account.last.username
expect { click_on submit_button }
.to change(Setting, :site_short_description).to('new key value')
expect(page)
.to have_content(success_message)
end
def short_description_field
form_label 'form_admin_settings.site_short_description'
end
def site_contact_email_field
form_label 'form_admin_settings.site_contact_email'
end
def site_contact_username_field
form_label 'form_admin_settings.site_contact_username'
end
end