1
|
require 'test_plugin_helper'
|
2
|
|
3
|
class DockerRegistryTest < ActiveSupport::TestCase
|
4
|
test 'used_location_ids should return coorect location ids' do
|
5
|
location = FactoryGirl.build(:location)
|
6
|
r = as_admin do
|
7
|
FactoryGirl.create(:docker_registry, :locations => ([location]))
|
8
|
end
|
9
|
assert r.used_location_ids.include?(location.id)
|
10
|
end
|
11
|
|
12
|
test 'used_organization_ids should return coorect organization ids' do
|
13
|
organization = FactoryGirl.build(:organization)
|
14
|
r = as_admin do
|
15
|
FactoryGirl.create(:docker_registry, :organizations => ([organization]))
|
16
|
end
|
17
|
assert r.used_organization_ids.include?(organization.id)
|
18
|
end
|
19
|
end
|