Commit 0e9c163b authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'snippet-selected-state' into 'master'

Change snippet award emoji state from active to selected

See merge request gitlab-org/gitlab!85242
parents b54d262f cfb995ab
......@@ -91,7 +91,7 @@ module IssuesHelper
if !can?(current_user, :award_emoji, awardable)
"disabled"
elsif current_user && awards.find { |a| a.user_id == current_user.id }
"active"
"selected"
else
""
end
......
......@@ -74,8 +74,8 @@ RSpec.describe IssuesHelper do
expect(helper.award_state_class(awardable, AwardEmoji.all, build(:user))).to eq('disabled')
end
it 'returns active string for author' do
expect(helper.award_state_class(awardable, AwardEmoji.all, upvote.user)).to eq('active')
it 'returns selected class for author' do
expect(helper.award_state_class(awardable, AwardEmoji.all, upvote.user)).to eq('selected')
end
it 'is blank for a user that has access to the awardable' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment