summaryrefslogtreecommitdiff
path: root/spec/features/issues/award_emoji_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-16 11:03:35 +0100
committerRémy Coutable <remy@rymai.me>2017-03-16 14:36:04 +0100
commitb196ee31d7124c4a4b3b3a23b99970e03378bd1d (patch)
tree3a3530c491fcea6058b26c2186fd55dd6da2f7fe /spec/features/issues/award_emoji_spec.rb
parent4a81867df14801c302f72096de8ee5327cfb4a39 (diff)
downloadgitlab-ce-b196ee31d7124c4a4b3b3a23b99970e03378bd1d.tar.gz
This quick-fixes an issue with existing award emoji not being valid anymore
Gitlab::Emoji#gl_emoji_tag now returns early instead of raising a 500 error. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features/issues/award_emoji_spec.rb')
-rw-r--r--spec/features/issues/award_emoji_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/features/issues/award_emoji_spec.rb b/spec/features/issues/award_emoji_spec.rb
index f424186cf30..16e453bc328 100644
--- a/spec/features/issues/award_emoji_spec.rb
+++ b/spec/features/issues/award_emoji_spec.rb
@@ -17,8 +17,21 @@ describe 'Awards Emoji', feature: true do
login_as(user)
end
+ describe 'visiting an issue with a legacy award emoji that is not valid anymore' do
+ before do
+ # The `heart_tip` emoji is not valid anymore so we need to skip validation
+ issue.award_emoji.build(user: user, name: 'heart_tip').save!(validate: false)
+ visit namespace_project_issue_path(project.namespace, project, issue)
+ end
+
+ # Regression test: https://gitlab.com/gitlab-org/gitlab-ce/issues/29529
+ it 'does not shows a 500 page' do
+ expect(page).to have_text(issue.title)
+ end
+ end
+
describe 'Click award emoji from issue#show' do
- let!(:note) { create(:note_on_issue, noteable: issue, project: issue.project, note: "Hello world") }
+ let!(:note) { create(:note_on_issue, noteable: issue, project: issue.project, note: "Hello world") }
before do
visit namespace_project_issue_path(project.namespace, project, issue)