mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 17:44:24 +00:00
22 lines
641 B
Ruby
22 lines
641 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe Admin::DisputesHelper do
|
|
describe 'strike_action_label' do
|
|
it 'returns html describing the appeal' do
|
|
adam = Account.new(username: 'Adam')
|
|
becky = Account.new(username: 'Becky')
|
|
strike = AccountWarning.new(account: adam, action: :suspend)
|
|
appeal = Appeal.new(strike: strike, account: becky)
|
|
|
|
expected = <<~OUTPUT.strip
|
|
<span class="username">Adam</span> suspended <span class="target">Becky</span>'s account
|
|
OUTPUT
|
|
result = helper.strike_action_label(appeal)
|
|
|
|
expect(result).to eq(expected)
|
|
end
|
|
end
|
|
end
|