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 ...@@ -91,7 +91,7 @@ module IssuesHelper
if !can?(current_user, :award_emoji, awardable) if !can?(current_user, :award_emoji, awardable)
"disabled" "disabled"
elsif current_user && awards.find { |a| a.user_id == current_user.id } elsif current_user && awards.find { |a| a.user_id == current_user.id }
"active" "selected"
else else
"" ""
end end
......
...@@ -74,8 +74,8 @@ RSpec.describe IssuesHelper do ...@@ -74,8 +74,8 @@ RSpec.describe IssuesHelper do
expect(helper.award_state_class(awardable, AwardEmoji.all, build(:user))).to eq('disabled') expect(helper.award_state_class(awardable, AwardEmoji.all, build(:user))).to eq('disabled')
end end
it 'returns active string for author' do it 'returns selected class for author' do
expect(helper.award_state_class(awardable, AwardEmoji.all, upvote.user)).to eq('active') expect(helper.award_state_class(awardable, AwardEmoji.all, upvote.user)).to eq('selected')
end end
it 'is blank for a user that has access to the awardable' do 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