You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
495 B
15 lines
495 B
# 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
|
|
|