mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-14 12:14:24 -05:00
f24daa399b
* Remote spec for non-existent entry_classes helper method This method no longer exists, and is handled by a local variable in a partial instead. * Remove spec for non-existent Account#ping! method
18 lines
503 B
Ruby
18 lines
503 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe StreamEntriesHelper, type: :helper do
|
|
describe '#display_name' do
|
|
it 'uses the display name when it exists' do
|
|
account = Account.new(display_name: "Display", username: "Username")
|
|
|
|
expect(helper.display_name(account)).to eq "Display"
|
|
end
|
|
|
|
it 'uses the username when display name is nil' do
|
|
account = Account.new(display_name: nil, username: "Username")
|
|
|
|
expect(helper.display_name(account)).to eq "Username"
|
|
end
|
|
end
|
|
end
|