expect(rendered).tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: feature_title||s_('RegistrationFeatures|use this feature')})
expect(rendered).tohave_link(s_('RegistrationFeatures|Enable Service Ping and register for this feature.'))
expect(rendered).tohave_link(s_('RegistrationFeatures|Registration Features Program'))
end
end
RSpec.shared_examples'does not render registration features prompt'do|disabled_field,feature_title|
RSpec.shared_examples'does not render registration features prompt'do|disabled_field|
it'does not render a placeholder input with registration features message'do
render
...
...
@@ -22,7 +8,7 @@ RSpec.shared_examples 'does not render registration features prompt' do |disable
expect(rendered).not_tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: feature_title||s_('RegistrationFeatures|use this feature')})
expect(rendered).not_tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: s_('RegistrationFeatures|use this feature')})
expect(rendered).not_tohave_link(s_('RegistrationFeatures|Enable Service Ping and register for this feature.'))
expect(rendered).not_tohave_link(s_('RegistrationFeatures|Registration Features Program'))
expect(rendered).tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: s_('RegistrationFeatures|use this feature')})
expect(rendered).tohave_link(s_('RegistrationFeatures|Enable Service Ping and register for this feature.'))
expect(rendered).tohave_link(s_('RegistrationFeatures|Registration Features Program'))
expect(rendered).tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: feature_title||s_('RegistrationFeatures|use this feature')})
expect(rendered).tohave_link(s_('RegistrationFeatures|Registration Features Program'))
end
end
RSpec.shared_examples'does not render registration features prompt'do|disabled_field,feature_title|
it'does not render a placeholder input with registration features message'do
expect(rendered).not_tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: feature_title||s_('RegistrationFeatures|use this feature')})
expect(rendered).not_tohave_link(s_('RegistrationFeatures|Registration Features Program'))
expect(rendered).tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: s_('RegistrationFeatures|use this feature')})
expect(rendered).tohave_link(s_('RegistrationFeatures|Registration Features Program'))
end
end
context'with service ping enabled'do
...
...
@@ -147,7 +153,13 @@ RSpec.describe 'groups/edit.html.haml' do
expect(rendered).not_tohave_content(s_("RegistrationFeatures|Want to %{feature_title} for free?")%{feature_title: s_('RegistrationFeatures|use this feature')})
expect(rendered).not_tohave_link(s_('RegistrationFeatures|Registration Features Program'))