Sha256: a3020224e8d4a9e5c3888f20cfa0d63d4ed413c53fe65a41f46c9d5f9e0d96e4

Contents?: true

Size: 756 Bytes

Versions: 28

Compression:

Stored size: 756 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
    @base_url = 'http://www.example.com/flapjack/'

    @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

28 entries across 28 versions & 1 rubygems

Version Path
flapjack-1.6.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.6.0rc4 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.6.0rc3 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.6.0rc2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.6.0rc1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.5.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.5.0rc1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.4.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.4.0rc1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.3.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.3.0rc3 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.3.0rc2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.3.0rc1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.1rc3 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.1rc2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.1rc1 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.0 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-1.2.0rc2 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb