Commit cfb995ab authored by Taurie Davis's avatar Taurie Davis Committed by Mayra Cabrera

Change snippet award emoji state from active to selected

Changelog: changed
parent a6cbb088
......@@ -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