Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-05-24 10:10:45 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-05-24 23:29:59 +0300
commit4cd6fc6e3b7198903900b39c0ff3d9dbae216b21 (patch)
tree7f05c01df4ca81b1448fe85b04e143634fdb3f33 /spec
parent2f277d10ac574fbe6b19d22799bd32daf49de56b (diff)
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')
-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