Commit 7b70d81c831d3e033993ef571e085bfee28ae590
1 parent
91a31d76
Exists in
master
and in
4 other branches
Speed up tests
Showing
2 changed files
with
3 additions
and
6 deletions
Show diff stats
spec/factories.rb
| @@ -17,16 +17,14 @@ FactoryGirl.define do | @@ -17,16 +17,14 @@ FactoryGirl.define do | ||
| 17 | sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" } | 17 | sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" } |
| 18 | password "123456" | 18 | password "123456" |
| 19 | password_confirmation { password } | 19 | password_confirmation { password } |
| 20 | + confirmed_at { Time.now } | ||
| 21 | + confirmation_token { nil } | ||
| 20 | 22 | ||
| 21 | trait :admin do | 23 | trait :admin do |
| 22 | admin true | 24 | admin true |
| 23 | end | 25 | end |
| 24 | 26 | ||
| 25 | factory :admin, traits: [:admin] | 27 | factory :admin, traits: [:admin] |
| 26 | - | ||
| 27 | - after :create do |u| | ||
| 28 | - u.confirm! | ||
| 29 | - end | ||
| 30 | end | 28 | end |
| 31 | 29 | ||
| 32 | factory :project do | 30 | factory :project do |
spec/support/test_env.rb
| @@ -86,9 +86,8 @@ module TestEnv | @@ -86,9 +86,8 @@ module TestEnv | ||
| 86 | ) | 86 | ) |
| 87 | 87 | ||
| 88 | ActivityObserver.any_instance.stub( | 88 | ActivityObserver.any_instance.stub( |
| 89 | - current_user: double("current_user", id: 1) | 89 | + current_user: double("current_user", id: 1) |
| 90 | ) | 90 | ) |
| 91 | - | ||
| 92 | end | 91 | end |
| 93 | 92 | ||
| 94 | def clear_repo_dir(namespace, name) | 93 | def clear_repo_dir(namespace, name) |