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-23 23:47:05 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-05-24 23:29:59 +0300
commit2f277d10ac574fbe6b19d22799bd32daf49de56b (patch)
tree7b2a2f645ec74850e1bd33ee8b97ee5bea7cc9ab /spec
parentdfc2542f55953815f703d743635d6faf2523d1a1 (diff)
ensure rss token on read
we do this on attribute read since migrating all existing users is not a feasible solution.
Diffstat (limited to 'spec')
-rw-r--r--spec/models/user_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index ca2b872729f..aabdac4bb75 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -448,9 +448,11 @@ describe User, models: true do
end
describe 'rss token' do
- it 'has rss token' do
- user = create(:user)
- expect(user.rss_token).not_to be_blank
+ it 'ensures an rss token on read' do
+ user = create(:user, rss_token: nil)
+ rss_token = user.rss_token
+ expect(rss_token).not_to be_blank
+ expect(user.reload.rss_token).to eq rss_token
end
end