diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-02 21:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-02 21:09:47 +0300 |
commit | 0a9b6b99a9bdcacea434501320f1a8d131a33827 (patch) | |
tree | b3fb338cec894837358b82635c90a52f5b8e0c3d /spec/helpers/snippets_helper_spec.rb | |
parent | d944f09d3212ca8aad09b92dbbae7323ee634237 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/snippets_helper_spec.rb')
-rw-r--r-- | spec/helpers/snippets_helper_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/helpers/snippets_helper_spec.rb b/spec/helpers/snippets_helper_spec.rb index 48f67a291c4..43e663464c8 100644 --- a/spec/helpers/snippets_helper_spec.rb +++ b/spec/helpers/snippets_helper_spec.rb @@ -80,10 +80,25 @@ RSpec.describe SnippetsHelper do context 'for Project Snippets' do let(:snippet) { public_project_snippet } + let(:project) { snippet.project } it 'returns copy button of embedded snippets' do expect(subject).to eq(copy_button(blob.id.to_s)) end + + describe 'path helpers' do + specify '#toggle_award_emoji_project_project_snippet_path' do + expect(toggle_award_emoji_project_project_snippet_path(project, snippet, a: 1)).to eq( + "/#{project.full_path}/-/snippets/#{snippet.id}/toggle_award_emoji?a=1" + ) + end + + specify '#toggle_award_emoji_project_project_snippet_url' do + expect(toggle_award_emoji_project_project_snippet_url(project, snippet, a: 1)).to eq( + "http://test.host/#{project.full_path}/-/snippets/#{snippet.id}/toggle_award_emoji?a=1" + ) + end + end end def copy_button(blob_id) |