mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-03 17:56:26 +01:00
Spec Activitystreams2BuilderHelper (#3413)
This commit is contained in:
parent
5aacd9d4c7
commit
52ae83d008
15
spec/helpers/activitystreams2_builder_helper_spec.rb
Normal file
15
spec/helpers/activitystreams2_builder_helper_spec.rb
Normal file
@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Activitystreams2BuilderHelper, type: :helper do
|
||||
it 'returns display name if present' do
|
||||
account = Fabricate(:account, display_name: 'display name', username: 'username')
|
||||
expect(account_name(account)).to eq 'display name'
|
||||
end
|
||||
|
||||
it 'returns username if display name is not present' do
|
||||
account = Fabricate(:account, display_name: '', username: 'username')
|
||||
expect(account_name(account)).to eq 'username'
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user