2016-11-23 10:13:24 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'Admin browse spam logs' do
|
2017-03-23 12:37:14 -04:00
|
|
|
let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) }
|
2016-11-23 10:13:24 -05:00
|
|
|
|
|
|
|
before do
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(create(:admin))
|
2016-11-23 10:13:24 -05:00
|
|
|
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
|