Commit 55d5d636 authored by Justin Ho's avatar Justin Ho

Add translated strings to specs

parent ad11b5e3
...@@ -15,8 +15,8 @@ RSpec.describe 'projects/hooks/edit' do ...@@ -15,8 +15,8 @@ RSpec.describe 'projects/hooks/edit' do
it 'renders webhook page with "Recent events"' do it 'renders webhook page with "Recent events"' do
render render
expect(rendered).to have_css('h4', text: 'Webhook') expect(rendered).to have_css('h4', text: _('Webhook'))
expect(rendered).to have_text('Recent events') expect(rendered).to have_text(_('Recent events'))
end end
context 'webhook is rate limited' do context 'webhook is rate limited' do
...@@ -27,7 +27,7 @@ RSpec.describe 'projects/hooks/edit' do ...@@ -27,7 +27,7 @@ RSpec.describe 'projects/hooks/edit' do
it 'renders alert' do it 'renders alert' do
render render
expect(rendered).to have_text('Webhook was automatically disabled') expect(rendered).to have_text(s_('Webhooks|Webhook was automatically disabled'))
end end
end end
end end
...@@ -17,9 +17,9 @@ RSpec.describe 'projects/hooks/index' do ...@@ -17,9 +17,9 @@ RSpec.describe 'projects/hooks/index' do
it 'renders webhooks page with "Project Hooks"' do it 'renders webhooks page with "Project Hooks"' do
render render
expect(rendered).to have_css('h4', text: 'Webhooks') expect(rendered).to have_css('h4', text: _('Webhooks'))
expect(rendered).to have_text('Project Hooks') expect(rendered).to have_text('Project Hooks')
expect(rendered).not_to have_css('.gl-badge', text: 'Disabled') expect(rendered).not_to have_css('.gl-badge', text: _('Disabled'))
end end
context 'webhook is rate limited' do context 'webhook is rate limited' do
...@@ -30,7 +30,7 @@ RSpec.describe 'projects/hooks/index' do ...@@ -30,7 +30,7 @@ RSpec.describe 'projects/hooks/index' do
it 'renders "Disabled" badge' do it 'renders "Disabled" badge' do
render render
expect(rendered).to have_css('.gl-badge', text: 'Disabled') expect(rendered).to have_css('.gl-badge', text: _('Disabled'))
end end
end end
end end
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