Fix missing thumbs down image (#6151)
This commit is contained in:
parent
bbec492844
commit
b0a873316f
3 changed files with 20 additions and 1 deletions
|
|
@ -11,7 +11,8 @@ class ReactionImage
|
|||
"unicorn" => "emoji/emoji-one-unicorn.png",
|
||||
"hands" => "emoji/emoji-one-hands.png",
|
||||
"thinking" => "emoji/emoji-one-thinking.png",
|
||||
"readinglist" => "emoji/emoji-one-bookmark.png"
|
||||
"readinglist" => "emoji/emoji-one-bookmark.png",
|
||||
"thumbsdown" => "emoji/emoji-one-thumbs-down.png"
|
||||
}.freeze
|
||||
images[category]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,4 +10,10 @@ FactoryBot.define do
|
|||
association :reactable, factory: :article
|
||||
category { "readinglist" }
|
||||
end
|
||||
|
||||
factory :thumbsdown_reaction, class: "Reaction" do
|
||||
user
|
||||
association :reactable, factory: :article
|
||||
category { "thumbsdown" }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -579,6 +579,18 @@ RSpec.describe "NotificationsIndex", type: :request do
|
|||
end
|
||||
end
|
||||
|
||||
context "when user is trusted" do
|
||||
let(:user) { create(:user, :trusted) }
|
||||
let(:reaction) { create(:thumbsdown_reaction, user: user) }
|
||||
|
||||
it "allow sees thumbsdown category" do
|
||||
sign_in user
|
||||
Notification.send_reaction_notification_without_delay(reaction, user)
|
||||
get "/notifications"
|
||||
expect(response.body).to include("Notifications")
|
||||
end
|
||||
end
|
||||
|
||||
context "when a user has a new welcome notification" do
|
||||
# TODO: [@thepracticaldev/delightful] Only test against type_of Welcome once Onbarding notifications have been removed.
|
||||
let(:active_broadcast) { create(:broadcast, :onboarding, :active) }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue