summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/auto_devops_helper_spec.rb2
-rw-r--r--spec/helpers/button_helper_spec.rb8
-rw-r--r--spec/helpers/markup_helper_spec.rb2
-rw-r--r--spec/helpers/visibility_level_helper_spec.rb10
4 files changed, 11 insertions, 11 deletions
diff --git a/spec/helpers/auto_devops_helper_spec.rb b/spec/helpers/auto_devops_helper_spec.rb
index 75c30dbfe48..90ed0eaaa81 100644
--- a/spec/helpers/auto_devops_helper_spec.rb
+++ b/spec/helpers/auto_devops_helper_spec.rb
@@ -122,7 +122,7 @@ describe AutoDevopsHelper do
allow(helper).to receive(:missing_auto_devops_domain?).and_return(true)
end
- it { is_expected.to eq('Auto Review Apps and Auto Deploy need a domain name to work correctly.') }
+ it { is_expected.to eq(_('Auto Review Apps and Auto Deploy need a domain name to work correctly.')) }
end
end
end
diff --git a/spec/helpers/button_helper_spec.rb b/spec/helpers/button_helper_spec.rb
index eebae1d7290..a2c2fba676c 100644
--- a/spec/helpers/button_helper_spec.rb
+++ b/spec/helpers/button_helper_spec.rb
@@ -29,7 +29,7 @@ describe ButtonHelper do
it 'shows the password text on the dropdown' do
description = element.search('.dropdown-menu-inner-content').first
- expect(description.inner_text).to eq 'Set a password on your account to pull or push via HTTP.'
+ expect(description.inner_text).to eq _('Set a password on your account to pull or push via HTTP.')
end
end
end
@@ -43,7 +43,7 @@ describe ButtonHelper do
it 'has a personal access token text on the dropdown description' do
description = element.search('.dropdown-menu-inner-content').first
- expect(description.inner_text).to eq 'Create a personal access token on your account to pull or push via HTTP.'
+ expect(description.inner_text).to eq _('Create a personal access token on your account to pull or push via HTTP.')
end
end
@@ -177,13 +177,13 @@ describe ButtonHelper do
context 'when `text` attribute is provided' do
it 'shows copy to clipboard button with provided `text` to copy' do
- expect(element(text: 'Hello World!').attr('data-clipboard-text')).to eq('Hello World!')
+ expect(element(text: _('Hello World!')).attr('data-clipboard-text')).to eq(_('Hello World!'))
end
end
context 'when `title` attribute is provided' do
it 'shows copy to clipboard button with provided `title` as tooltip' do
- expect(element(title: 'Copy to my clipboard!').attr('aria-label')).to eq('Copy to my clipboard!')
+ expect(element(title: _('Copy to my clipboard!')).attr('aria-label')).to eq(_('Copy to my clipboard!'))
end
end
end
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index a0c0af94fa5..18efb5225b4 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -298,7 +298,7 @@ describe MarkupHelper do
it 'truncates the text with multiple paragraphs' do
object = create_object("Paragraph 1\n\nParagraph 2")
- expected = 'Paragraph 1...'
+ expected = _('Paragraph 1...')
expect(first_line_in_markdown(object, attribute, 100, project: project)).to match(expected)
end
diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb
index e565ac8c530..158c4d624f6 100644
--- a/spec/helpers/visibility_level_helper_spec.rb
+++ b/spec/helpers/visibility_level_helper_spec.rb
@@ -57,29 +57,29 @@ describe VisibilityLevelHelper do
describe "#project_visibility_level_description" do
it "describes private projects" do
expect(project_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE))
- .to eq "Project access must be granted explicitly to each user."
+ .to eq _("Project access must be granted explicitly to each user.")
end
it "describes public projects" do
expect(project_visibility_level_description(Gitlab::VisibilityLevel::PUBLIC))
- .to eq "The project can be accessed without any authentication."
+ .to eq _("The project can be accessed without any authentication.")
end
end
describe "#snippet_visibility_level_description" do
it 'describes visibility only for me' do
expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, personal_snippet))
- .to eq "The snippet is visible only to me."
+ .to eq _("The snippet is visible only to me.")
end
it 'describes visibility for project members' do
expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE, project_snippet))
- .to eq "The snippet is visible only to project members."
+ .to eq _("The snippet is visible only to project members.")
end
it 'defaults to personal snippet' do
expect(snippet_visibility_level_description(Gitlab::VisibilityLevel::PRIVATE))
- .to eq "The snippet is visible only to me."
+ .to eq _("The snippet is visible only to me.")
end
end