# frozen_string_literal: truerequire'spec_helper'RSpec.describeSystemCheck::Geo::LicenseCheckdodescribe'#check?'dousingRSpec::Parameterized::TableSyntaxwhere(:primary,:geo_enabled,:license_allows,:check_result,:pass_message)dotrue|true|true|true|''true|true|false|false|''true|false|true|true|'License supports Geo, but Geo is not enabled'true|false|false|true|'License does not support Geo, and Geo is not enabled'false|true|true|true|''false|true|false|true|'License only required on a primary site'false|false|true|true|''false|false|false|true|''endwith_themdobeforedoallow(Gitlab::Geo).toreceive(:primary?).and_return(primary)allow(Gitlab::Geo).toreceive(:enabled?).and_return(geo_enabled)allow(Gitlab::Geo).toreceive(:license_allows?).and_return(license_allows)endit'checks the license'doexpect(subject.check?).toeq(check_result)expect(described_class.check_pass).toeq(pass_message)ifcheck_resultendendendend