debian-mirror-gitlab/spec/features/admin/admin_browse_spam_logs_spec.rb
2020-06-23 00:09:42 +05:30

24 lines
685 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Admin browse spam logs' do
let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) }
before do
sign_in(create(:admin))
end
it '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