# External authentication support
- def openid_logo
- image_tag "openid.svg", :size => "36", :alt => t("application.auth_providers.openid_logo_alt"), :class => "align-text-bottom"
- end
-
def auth_button(name, provider, options = {})
link_to(
image_tag("#{name}.svg",
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
<div id="login_openid_url" class="mb-3">
<label for="openid_url" class="form-label">
- <%= openid_logo %>
+ <%= image_tag "openid.svg", :size => "36", :alt => t(".openid_logo_alt"), :class => "align-text-bottom" %>
<%= t ".openid_url" %>
</label>
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
assert_match %r{^<img .* width="50" height="50" .* />$}, thumbnail
end
- def test_openid_logo
- logo = openid_logo
- assert_match %r{^<img .* src="/images/openid.svg" .* />$}, logo
- end
-
def test_auth_button
button = auth_button("google", "google")
img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"