Commit 18048a60 authored by Thong Kuah's avatar Thong Kuah Committed by James Lopez

Add frozen_string_literal to helper specs

https://gitlab.com/gitlab-org/gitlab/issues/27703
parent 33c2a94c
...@@ -81,7 +81,7 @@ module SubmoduleHelper ...@@ -81,7 +81,7 @@ module SubmoduleHelper
end end
def relative_self_links(relative_path, commit, project) def relative_self_links(relative_path, commit, project)
relative_path.rstrip! relative_path = relative_path.rstrip
absolute_project_path = "/" + project.full_path absolute_project_path = "/" + project.full_path
# Resolve `relative_path` to target path # Resolve `relative_path` to target path
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ApplicationHelper do describe ApplicationHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe AutoDevopsHelper do describe AutoDevopsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe AvatarsHelper do describe AvatarsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe AwardEmojiHelper do describe AwardEmojiHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlameHelper do describe BlameHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BlobHelper do describe BlobHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BoardsHelper do describe BoardsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe BroadcastMessagesHelper do describe BroadcastMessagesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ButtonHelper do describe ButtonHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe CalendarHelper do describe CalendarHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe CiStatusHelper do describe CiStatusHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe CommitsHelper do describe CommitsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ComponentsHelper do describe ComponentsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe DashboardHelper do describe DashboardHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe DeferScriptTagHelper do describe DeferScriptTagHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe EmailsHelper do describe EmailsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe EventsHelper do describe EventsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ExploreHelper do describe ExploreHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe FormHelper do describe FormHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe GitHelper do describe GitHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe GitlabRoutingHelper do describe GitlabRoutingHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe GraphHelper do describe GraphHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe HooksHelper do describe HooksHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe IconsHelper do describe IconsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ImportHelper do describe ImportHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe InstanceConfigurationHelper do describe InstanceConfigurationHelper do
......
# frozen_string_literal: true
require "spec_helper" require "spec_helper"
describe IssuesHelper do describe IssuesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe LabelsHelper do describe LabelsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe MarkupHelper do describe MarkupHelper do
...@@ -408,12 +410,12 @@ describe MarkupHelper do ...@@ -408,12 +410,12 @@ describe MarkupHelper do
it 'preserves a link href when link text is truncated' do it 'preserves a link href when link text is truncated' do
text = 'The quick brown fox jumped over the lazy dog' # 44 chars text = 'The quick brown fox jumped over the lazy dog' # 44 chars
input = "#{text}#{text}#{text} " # 133 chars
link_url = 'http://example.com/foo/bar/baz' # 30 chars link_url = 'http://example.com/foo/bar/baz' # 30 chars
input << link_url input = "#{text}#{text}#{text} #{link_url}" # 163 chars
object = create_object(input)
expected_link_text = 'http://example...</a>' expected_link_text = 'http://example...</a>'
object = create_object(input)
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(link_url) expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(link_url)
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(expected_link_text) expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(expected_link_text)
end end
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe MembersHelper do describe MembersHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe MilestonesHelper do describe MilestonesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe MilestonesRoutingHelper do describe MilestonesRoutingHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe NamespacesHelper do describe NamespacesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe NavHelper, :do_not_mock_admin_mode do describe NavHelper, :do_not_mock_admin_mode do
......
# frozen_string_literal: true
require "spec_helper" require "spec_helper"
describe NotesHelper do describe NotesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe NotificationsHelper do describe NotificationsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe PageLayoutHelper do describe PageLayoutHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe PaginationHelper do describe PaginationHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe PreferencesHelper do describe PreferencesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe ProfilesHelper do describe ProfilesHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe RssHelper do describe RssHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe RunnersHelper do describe RunnersHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe SearchHelper do describe SearchHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe SidekiqHelper do describe SidekiqHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe SnippetsHelper do describe SnippetsHelper do
......
# frozen_string_literal: true
require "spec_helper" require "spec_helper"
describe StorageHelper do describe StorageHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe SubmoduleHelper do describe SubmoduleHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe TabHelper do describe TabHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe TimeHelper do describe TimeHelper do
......
# frozen_string_literal: true
require "spec_helper" require "spec_helper"
describe TodosHelper do describe TodosHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe TreeHelper do describe TreeHelper do
......
# frozen_string_literal: true
require "spec_helper" require "spec_helper"
describe UserCalloutsHelper do describe UserCalloutsHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe UsersHelper do describe UsersHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe VersionCheckHelper do describe VersionCheckHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe VisibilityLevelHelper do describe VisibilityLevelHelper do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe WikiHelper do describe WikiHelper 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