Fix RS dashboard for auths without Web App

RS auths without a valid domain name will not fetch any metadata and
therefore not create a WebApp record. This fixes icons being looked up
anyway, resulting in exceptions
This commit is contained in:
2024-02-08 12:51:53 +01:00
parent a7cbd8ce36
commit 70ac3b0a70
5 changed files with 40 additions and 9 deletions

View File

@@ -0,0 +1,11 @@
require "rails_helper"
RSpec.describe AppCatalog::WebAppIconComponent, type: :component do
describe "No web app given" do
it "renders the default icon" do
expect(
render_inline(described_class.new(web_app: nil)) {}.to_html
).to include("icon-remotestorage")
end
end
end