Ahh, OK. You probably should test that "URL" property gets set correctly
then? I don't think nil test is very useful.
On Sep 16, 2013 10:59 AM, "Greg Sutcliffe" <notifications@github.com> wrote:

> In test/lib/proxy_api/template_test.rb:
>
> > +require 'test_helper'
> > +
> > +class ProxyApiTemplateTest < ActiveSupport::TestCase
> > +  def setup
> > +    @url = "http://localhost:8443"
> > +    @template = ProxyAPI::Template.new({:url => @url})
> > +  end
> > +
> > +  def fake_response(data)
> > +    net_http_resp = Net::HTTPResponse.new(1.0, 200, "OK")
> > +    net_http_resp.add_field 'Set-Cookie', 'Monster'
> > +    RestClient::Response.create(JSON(data), net_http_resp, nil)
> > +  end
> > +
> > +  test "constructor should complete" do
> > +    assert_not_nil(@template)
>
> We're testing that ProxyAPI::Template.new({:url => @url}) is properly
> initialized, thats all. Taking suggestions on a better name for the test :P
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/theforeman/foreman/pull/751/files#r6372235>
> .
>