2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe 'Admin browse spam logs' do
|
2017-08-17 22:00:37 +05:30
|
|
|
let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) }
|
|
|
|
|
|
|
|
before do
|
2021-02-22 17:27:13 +05:30
|
|
|
admin = create(:admin)
|
|
|
|
sign_in(admin)
|
|
|
|
gitlab_enable_admin_mode_sign_in(admin)
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
it 'browse spam logs' do
|
2017-08-17 22:00:37 +05:30
|
|
|
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
|