File: maliciousness_spec.rb

package info (click to toggle)
ruby-html-proofer 3.19.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,040 kB
  • sloc: ruby: 3,203; sh: 9; makefile: 4; javascript: 1; php: 1
file content (29 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

require 'spec_helper'

describe 'Maliciousness test' do
  it 'does not accept non-string input for single file' do
    expect do
      run_proofer(23, :file)
    end.to raise_error ArgumentError
  end

  it 'does not accept non-string input for directory' do
    expect do
      run_proofer(['wow/wow'], :directory)
    end.to raise_error ArgumentError
  end

  it 'does not accept string input for directories' do
    expect do
      run_proofer('wow/wow', :directories)
    end.to raise_error ArgumentError
  end

  it 'does not accept string input for links' do
    expect do
      run_proofer('woo', :links)
    end.to raise_error ArgumentError
  end
end