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.
21 lines
635 B
21 lines
635 B
# frozen_string_literal: true |
|
|
|
require 'rails_helper' |
|
|
|
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
|
|
|