Sha256: 4f3b7865e1a4c6d710e22c15b6f2d0620fc7444bc2f6653653c2fe75dba24acc

Contents?: true

Size: 710 Bytes

Versions: 5

Compression:

Stored size: 710 Bytes

Contents

require 'test_helper'

class SmartProxyTest < ActiveSupport::TestCase
  def test_should_be_valid
    proxy = SmartProxy.new
    proxy.name = "test proxy"
    proxy.url  = "https://secure.proxy:4568"
    assert proxy.valid?
  end

def test_should_not_be_modified_if_has_no_leading_slashes
    proxy = SmartProxy.new
    proxy.name = "test proxy"
    proxy.url  = "https://secure.proxy:4568"
    assert proxy.valid?
    assert_equal proxy.url, "https://secure.proxy:4568"
  end


  def test_should_not_include_trailing_slash
    proxy = SmartProxy.new
    proxy.name = "test a proxy"
    proxy.url  = "http://some.proxy:4568/"
    assert proxy.save
    assert_equal proxy.url, "http://some.proxy:4568"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/test/unit/smart_proxy_test.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/test/unit/smart_proxy_test.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/test/unit/smart_proxy_test.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/test/unit/smart_proxy_test.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/test/unit/smart_proxy_test.rb