Sha256: 64d78f95ea50a13f96728268a2d7f208661efaf3717427c0a845b2cfbb895757

Contents?: true

Size: 686 Bytes

Versions: 7

Compression:

Stored size: 686 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 = mock('contact')
    @contact.should_receive(:media)
    @contact.should_receive(:name).twice.and_return('Aeschylus')
    @contact.should_receive(:notification_rules)

    entity = mock('entity')
    entity.should_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)
    page.should match(%r{\?entity=abc-xyz-01&check=Disk%20%2F%20Utilisation})
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flapjack-0.7.27 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.7.26 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.7.25 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.7.22 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.7.21 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.7.20 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb
flapjack-0.7.19 spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb