summaryrefslogtreecommitdiff
path: root/spec/factories/users.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-05-24 09:10:45 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-05-24 22:29:59 +0200
commit4cd6fc6e3b7198903900b39c0ff3d9dbae216b21 (patch)
tree7f05c01df4ca81b1448fe85b04e143634fdb3f33 /spec/factories/users.rb
parent2f277d10ac574fbe6b19d22799bd32daf49de56b (diff)
downloadgitlab-ce-4cd6fc6e3b7198903900b39c0ff3d9dbae216b21.tar.gz
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.
Diffstat (limited to 'spec/factories/users.rb')
-rw-r--r--spec/factories/users.rb4
1 files changed, 4 insertions, 0 deletions
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