1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
# frozen_string_literal: true
require "test_helper"
class DashboardLandingsControllerTest < ActionDispatch::IntegrationTest
def test_it_shows_a_landing_page_with_local_static_asset_links
get graphql_dashboard.root_path
assert_includes response.body, "Welcome to the GraphQL-Ruby Dashboard"
assert_includes response.body, '<link rel="stylesheet" href="/dash/statics/bootstrap-5.3.3.min.css" media="screen" />', "it doesn't use config.asset_host"
end
def test_it_shows_version_and_schema_info
get graphql_dashboard.root_path
assert_includes response.body, "GraphQL-Ruby v#{GraphQL::VERSION}"
assert_includes response.body, "<code>DummySchema</code>"
get graphql_dashboard.root_path, params: { schema: "NotInstalledSchema" }
assert_includes response.body, "<code>NotInstalledSchema</code>"
end
end
|