1 |
ada932ab
|
Dmitri Dolguikh
|
FactoryGirl.define do
|
2 |
|
|
factory :docker_registry do
|
3 |
c57dae56
|
David Davis
|
sequence(:name) { |n| "hub#{n}" }
|
4 |
ada932ab
|
Dmitri Dolguikh
|
sequence(:url) { |n| "http://localhost/#{n}" }
|
5 |
64f6a1f2
|
Dmitri Dolguikh
|
sequence(:username) { |n| "username#{n}" }
|
6 |
|
|
sequence(:password) { |n| "password#{n}" }
|
7 |
ada932ab
|
Dmitri Dolguikh
|
end
|
8 |
|
|
|
9 |
9ea40591
|
Daniel Lobato
|
after(:build) do |registry|
|
10 |
|
|
registry.stubs(:attempt_login)
|
11 |
|
|
end
|
12 |
|
|
|
13 |
ada932ab
|
Dmitri Dolguikh
|
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 |