Speed up tests
This commit is contained in:
parent
91a31d767f
commit
7b70d81c83
2 changed files with 3 additions and 6 deletions
|
@ -17,16 +17,14 @@ FactoryGirl.define do
|
||||||
sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" }
|
sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" }
|
||||||
password "123456"
|
password "123456"
|
||||||
password_confirmation { password }
|
password_confirmation { password }
|
||||||
|
confirmed_at { Time.now }
|
||||||
|
confirmation_token { nil }
|
||||||
|
|
||||||
trait :admin do
|
trait :admin do
|
||||||
admin true
|
admin true
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :admin, traits: [:admin]
|
factory :admin, traits: [:admin]
|
||||||
|
|
||||||
after :create do |u|
|
|
||||||
u.confirm!
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :project do
|
factory :project do
|
||||||
|
|
|
@ -88,7 +88,6 @@ module TestEnv
|
||||||
ActivityObserver.any_instance.stub(
|
ActivityObserver.any_instance.stub(
|
||||||
current_user: double("current_user", id: 1)
|
current_user: double("current_user", id: 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear_repo_dir(namespace, name)
|
def clear_repo_dir(namespace, name)
|
||||||
|
|
Loading…
Reference in a new issue