This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/spec/helpers/stream_entries_helper_spec.rb
Matt Jankowski f24daa399b Remove pending specs for methods that dont exist (#1658)
* 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
2017-04-13 02:51:13 +02:00

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