bans: add test for logging in with expired ban.

This commit is contained in:
evazion
2017-05-07 12:12:43 -05:00
parent fd291c8b42
commit 19e91f438b
2 changed files with 17 additions and 1 deletions

View File

@@ -13,8 +13,9 @@ FactoryGirl.define do
bit_prefs 0
factory(:banned_user) do
transient { ban_duration 3 }
is_banned true
after(:create) { |user| create(:ban, user: user) }
after(:create) { |user, ctx| create(:ban, user: user, duration: ctx.ban_duration) }
end
factory(:member_user) do