debian-mirror-gitlab/spec/features/admin/admin_browse_spam_logs_spec.rb

25 lines
679 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
describe 'Admin browse spam logs' do
let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) }
before do
2017-09-10 17:25:29 +05:30
sign_in(create(:admin))
2017-08-17 22:00:37 +05:30
end
2018-11-08 19:23:39 +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