mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
FIX: action_code_path not being loaded for user-stream-item (#18577)
This commit fixes an issue where we had a typo in the UserAction.stream query which meant that action_code_path was not loaded correctly. Once that was fixed, we were also not actually using the action_code_path in the user-stream-item, so that has been fixed here too. The bug this caused was that, when the link for the action was clicked within the user-stream-item, the user would be redirected to a URL ending with `[missing%20%%7Bpath%7D%20value]` because the I18n call did not have the path present.
This commit is contained in:
@ -122,6 +122,7 @@ RSpec.describe UserAction do
|
||||
log_test_action(action_type: UserAction::ASSIGNED)
|
||||
private_post.custom_fields ||= {}
|
||||
private_post.custom_fields["action_code_who"] = 'testing'
|
||||
private_post.custom_fields["action_code_path"] = '/p/1234'
|
||||
private_post.custom_fields["random_field"] = 'random_value'
|
||||
private_post.save!
|
||||
end
|
||||
@ -133,6 +134,7 @@ RSpec.describe UserAction do
|
||||
|
||||
expect(user_action_row.action_type).to eq(UserAction::ASSIGNED)
|
||||
expect(user_action_row.action_code_who).to eq('testing')
|
||||
expect(user_action_row.action_code_path).to eq('/p/1234')
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user