mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-28 16:07:51 +00:00
Use helper method
This commit is contained in:
parent
421ecbf5f3
commit
b35fa9d7e8
|
@ -20,7 +20,7 @@ RSpec.describe 'Settings profile page' do
|
||||||
fill_in display_name_field, with: 'New name'
|
fill_in display_name_field, with: 'New name'
|
||||||
attach_file avatar_field, Rails.root.join('spec', 'fixtures', 'files', 'avatar.gif')
|
attach_file avatar_field, Rails.root.join('spec', 'fixtures', 'files', 'avatar.gif')
|
||||||
|
|
||||||
expect { click_on I18n.t('generic.save_changes') }
|
expect { click_on submit_button }
|
||||||
.to change { account.reload.display_name }.to('New name')
|
.to change { account.reload.display_name }.to('New name')
|
||||||
.and(change { account.reload.avatar.instance.avatar_file_name }.from(nil).to(be_present))
|
.and(change { account.reload.avatar.instance.avatar_file_name }.from(nil).to(be_present))
|
||||||
expect(ActivityPub::UpdateDistributionWorker)
|
expect(ActivityPub::UpdateDistributionWorker)
|
||||||
|
|
Loading…
Reference in a new issue