discourse/spec
Blake Erickson 67dec38f31 FIX: Gravatar download attempt if user is missing their email
It is possible that a user could exist without an email, if so we should
not enqueue a job to download their gravatar.

This commit resolves this error that can occur:

```
Job exception: undefined method `email' for nil:NilClass
/var/www/discourse/app/models/user.rb:1204:in `email'
/var/www/discourse/app/jobs/regular/update_gravatar.rb:12:in `execute'
```

This commit also fixes the original spec which actually was wrong. The
job never enqueued in the original spec and so the gravatar was never
actually updated and the test was checking if the two values were the
same, but they were both null and never updated, so of course they were
the same!

A new test has also been added to make sure the gravatar job isn't
enqueued when a user's email is missing.
2020-09-02 20:19:46 -06:00
..
components DEV: add plugin hooks for silence message parameters (#10538) 2020-09-01 17:25:24 -07:00
fabricators FIX: generate_topic_thumbnails job infinitely running for corrupted images 2020-08-13 17:08:32 -06:00
fixtures FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
helpers FEATURE: User selectable color schemes (#10544) 2020-08-28 10:36:52 -04:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration FIX: Pluralized translation overrides didn't work for en_US 2020-08-29 00:11:46 +02:00
integrity DEV: Check English locale for errors in CI 2020-06-03 21:54:58 +02:00
jobs FIX: Gravatar download attempt if user is missing their email 2020-09-02 20:19:46 -06:00
lib FIX: Add to tags result set only visible tags (#10580) 2020-09-02 13:24:40 +03:00
mailers FIX: Exclude shared drafts from digests 2020-08-04 13:35:48 -04:00
models FEATURE: User selectable color schemes (#10544) 2020-08-28 10:36:52 -04:00
multisite FIX: invalid urls should not break store.has_been_uploaded? 2020-06-25 15:00:15 +10:00
requests FIX: System message wasn't fully translatable 2020-09-02 15:24:25 +02:00
script/import_scripts FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
serializers Add category id to webhook post serializer 2020-09-02 10:42:51 -04:00
services DEV: add plugin hooks for silence message parameters (#10538) 2020-09-01 17:25:24 -07:00
support DEV: Improve docs for Sidekiq job assertion helpers. 2020-07-24 17:37:22 +08:00
tasks FEATURE: Add uploads:batch_migrate_from_s3 task to limit total posts migrated at once (#9933) 2020-06-04 09:48:11 +10:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb FIX: SiteSettings::LocalProcessProvider didn't work on multisite 2020-08-20 11:15:20 +02:00
swagger_helper.rb DEV: Add rswag to aid in api documention (#9546) 2020-04-27 16:40:07 -06:00