about summary refs log tree commit diff
path: root/spec/helpers/stream_entries_helper_spec.rb
blob: 221e1e32d66854f81490bab8c2e10b1977fb04ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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

  describe '#avatar_for_status_url' do
    pending
  end

  describe '#entry_classes' do
    pending
  end

  describe '#relative_time' do
    pending
  end

  describe '#reblogged_by_me_class' do
    pending
  end

  describe '#favourited_by_me_class' do
    pending
  end
end