Project

General

Profile

Download (565 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman-docker / test / units / registry_api_test.rb @ d2e54db4

1
require 'test_plugin_helper'
2

    
3
class RegistryApiTest <  ActiveSupport::TestCase
4
  test "initialize handles username password info correctly" do
5
    uname = "tardis"
6
    password = "boo"
7
    url = "http://docker-who.gov"
8
    reg = Service::RegistryApi.new(:url => url,
9
                                   :user => uname,
10
                                   :password => password)
11
    assert reg.config[:url].include?(uname)
12
    assert reg.config[:url].include?(password)
13

    
14
    reg = Service::RegistryApi.new(:url => url)
15
    assert_equal url, reg.config[:url]
16
  end
17
end