Closed aedwardg closed 2 years ago
@NickSchimek Open to any thoughts on if/how we want to test this.
@NickSchimek Open to any thoughts on if/how we want to test this.
A rails request spec. When a property_manager signs in. We update lastActive and respond successfully with a serialized property manager. Check serialization (lastActive) is correct.
@NickSchimek I just tried using update_column
, but rubocop doesn't like it. Should I change it back to update!
?
Oh we can turn that cop off, or disable it for that one line. Your choice.
The spec looks good. Just need to remove the puts
Oh we can turn that cop off, or disable it for that one line. Your choice.
I decided to only disable it for that line. I think in the long run, it's better to have it, especially if people less familiar with Rails contribute and see update_column
here.
What issue is this solving?
closes #829
The front end was rendering the "Last Usage" column based on the user's
lastActive
status, but this field in the database was never getting updated. Since we're not using devise trackable (which would automatically updatelast_sign_in_at
,current_sign_in_at
, etc.) we need to update this value ourselves.Note, this saves the datetime in the db in UTC time. I don't think we alter that for the front-end, so it may look off by a day if checked at certain times.
Screenshot
Any helpful knowledge/context for the reviewer?
Is a
yarn install
necessary? ❌ Any special requirements to test?Please make sure you've attempted to meet the following coding standards
If you're having trouble meeting this criteria, feel free to reach out on Slack for help!