docbrown/spec
Daniel Uber b6a1d59c28
ProfilePreviewCard serializes the user's created at, not the profile (#14392)
This matches what happens for the html preview ("Joined" is the user's
created_at timestamp), and what the json builder does:

    json.created_at utc_iso_timestamp(@user.created_at)

Update the test cases to assert the profile preview is showing the
user's created_at, not the profile's created at.

Since these are almost always the same thing, we didn't notice
this. However, if a user is created just before the second boundary,
and their profile created immediately after the second boundary (so
that the iso8601 values have distinct seconds) this could fail when
looking at the wrong objects timestamp.

To test this locally I modified the user let block to update the
timestamp to be a day earlier (this would not have happened in
practice but was sufficient to cover the use case).

     let(:user) { create(:profile).user.tap {|u| u.update(created_at: 1.day.ago) } }
2021-08-02 15:03:11 -05:00
..
black_box Remove <provider>_created_at columns (#13264) 2021-04-29 10:24:16 -05:00
controllers/concerns 15 minute fix: Add default argument to JsonApiSortParam (#13369) 2021-04-14 10:32:07 +07:00
decorators Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
factories Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
fixtures Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
generator Add service generator (#11265) 2020-11-10 09:09:35 +07:00
helpers Avoid showing social login options in ForemWebView (#14260) 2021-07-21 09:59:12 -06:00
initializers Bump rubocop-rails from 2.10.1 to 2.11.0 (#14043) 2021-06-22 11:25:28 -05:00
lib Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
liquid_tags Fix GitHub Readme liquid tag relative URLs (#14352) 2021-08-02 09:05:35 -05:00
mailers Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
models Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
policies expect to forbid, rather than expect not to permit (#14390) 2021-07-30 11:42:47 -05:00
queries Make Consumer Apps dictate aasa results (#14015) 2021-06-24 08:36:11 -06:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
requests ProfilePreviewCard serializes the user's created at, not the profile (#14392) 2021-08-02 15:03:11 -05:00
routing ✂✂✂ Remove shop_url from SiteConfig ✂✂✂ (#13773) 2021-05-18 09:03:05 +07:00
serializers/search Cleanup search classes and serializers (#13645) 2021-05-05 09:20:59 -04:00
services Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
support Fix GitHub Readme liquid tag relative URLs (#14352) 2021-08-02 09:05:35 -05:00
system Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
tasks Create Default Nav Links In New Forem (RFC #237) (#14345) 2021-08-02 12:52:36 -04:00
uploaders Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
view_objects [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
views Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
workers Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
rails_helper.rb Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
spec_helper.rb [15-minute fix] Don't allow markdown to use CSS classes (#13282) 2021-04-07 11:40:39 -04:00