fix smoke tests

This commit is contained in:
Régis Hanol 2016-02-17 11:57:06 +01:00
parent 8893d711e0
commit 532fb7ea9d
1 changed files with 7 additions and 9 deletions

View File

@ -70,20 +70,18 @@ if ENV["SMOKE"] == "1"
u.username_lower = "smoke_user" u.username_lower = "smoke_user"
u.email = "smoke_user@discourse.org" u.email = "smoke_user@discourse.org"
u.password = "P4ssw0rd" u.password = "P4ssw0rd"
u.email_direct = false
u.email_digests = false
u.email_private_messages = false
u.active = true u.active = true
u.approved = true u.approved = true
u.approved_at = Time.now u.approved_at = Time.now
u.trust_level = TrustLevel[3] u.trust_level = TrustLevel[3]
end.first end.first
EmailToken.seed do |et| UserOption.where(user_id: smoke_user.id).update_all(
et.id = 1 email_direct: false,
et.user_id = smoke_user.id email_digests: false,
et.email = smoke_user.email email_private_messages: false,
et.confirmed = true )
end
EmailToken.where(user_id: smoke_user.id).update_all(confirmed: true)
end end