BigW Consortium Gitlab

admin_browse_spam_logs_spec.rb 618 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
require 'spec_helper'

describe 'Admin browse spam logs' do
  let!(:spam_log) { create(:spam_log) }

  before do
    login_as :admin
  end

  scenario 'Browse spam logs' do
    visit admin_spam_logs_path

    expect(page).to have_content('Spam Logs')
    expect(page).to have_content(spam_log.source_ip)
    expect(page).to have_content(spam_log.noteable_type)
    expect(page).to have_content('N')
    expect(page).to have_content(spam_log.title)
    expect(page).to have_content("#{spam_log.description[0...97]}...")
    expect(page).to have_link('Remove user')
    expect(page).to have_link('Block user')
  end
end