From 4cd6fc6e3b7198903900b39c0ff3d9dbae216b21 Mon Sep 17 00:00:00 2001 From: Alexis Reigel Date: Wed, 24 May 2017 09:10:45 +0200 Subject: create User#rss_token in user factory explicitely otherwise we'll have to use `user.reload` in the specs to get the current rss_token value. --- spec/factories/users.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/factories/users.rb') diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 33fa80772ff..e60fe713bc3 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -8,6 +8,10 @@ FactoryGirl.define do confirmation_token { nil } can_create_group true + before(:create) do |user| + user.ensure_rss_token + end + trait :admin do admin true end -- cgit v1.2.1