Sha256: b4481698cd3dd6600795929426060974881254ea009325b8b9a86e07ce96f679

Contents?: true

Size: 704 Bytes

Versions: 20

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe 'web/views/contact.html.erb', :erb_view => true do

  it "should escape unsafe check characters in URI parameters" do
    @contact = double('contact')
    expect(@contact).to receive(:media)
    expect(@contact).to receive(:name).and_return('Aeschylus')
    expect(@contact).to receive(:notification_rules)

    entity = double('entity')
    expect(entity).to receive(:name).exactly(3).times.and_return('abc-xyz-01')

    checks = ['Disk / Utilisation']

    @entities_and_checks = [{:entity => entity, :checks => checks}]

    page = render_erb('contact.html.erb', binding)
    expect(page).to match(%r{\?entity=abc-xyz-01&check=Disk%20%2F%20Utilisation})
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
flapjack-0.9.6 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.9.5 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.9.4 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.9.3 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.9.2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.9.1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.9.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.12 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.11 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.10 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.9 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.8 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.7 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.6 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.5 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.4 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.3 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.8.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb