2018-03-26 17:54:30 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-07-05 06:32:05 +00:00
|
|
|
describe 'Hook logs' do
|
|
|
|
let(:web_hook_log) { create(:web_hook_log, response_body: '<script>') }
|
|
|
|
let(:project) { web_hook_log.web_hook.project }
|
|
|
|
let(:user) { create(:user) }
|
2018-03-26 17:54:30 +00:00
|
|
|
|
|
|
|
before do
|
|
|
|
project.add_master(user)
|
|
|
|
|
|
|
|
sign_in(user)
|
|
|
|
end
|
|
|
|
|
2018-07-05 06:32:05 +00:00
|
|
|
it 'user reads log without getting XSS' do
|
2018-03-26 17:54:30 +00:00
|
|
|
visit(
|
|
|
|
project_hook_hook_log_path(
|
|
|
|
project, web_hook_log.web_hook, web_hook_log))
|
|
|
|
|
|
|
|
expect(page).to have_content('<script>')
|
|
|
|
end
|
|
|
|
end
|