Project

General

Profile

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

foreman-docker / test / factories / docker_registry.rb @ 9ea40591

1
FactoryGirl.define do
2
  factory :docker_registry do
3
    sequence(:name) { |n| "hub#{n}" }
4
    sequence(:url) { |n| "http://localhost/#{n}" }
5
    sequence(:username) { |n| "username#{n}" }
6
    sequence(:password) { |n| "password#{n}" }
7
  end
8

    
9
  after(:build) do |registry|
10
    registry.stubs(:attempt_login)
11
  end
12

    
13
  trait :with_location do
14
    locations { [FactoryGirl.build(:location)] }
15
  end
16

    
17
  trait :with_organization do
18
    organizations { [FactoryGirl.build(:organization)] }
19
  end
20
end