From 22466c167b73743cca4614a046f3051570963799 Mon Sep 17 00:00:00 2001 From: Isabel Barrera Date: Fri, 25 Oct 2019 12:14:59 -0400 Subject: [PATCH] [NT-423] Remove hardcoded feature flag (#906) --- Library/Extensions/Feature+Helpers.swift | 3 -- Library/Extensions/Feature+HelpersTests.swift | 39 ------------------- 2 files changed, 42 deletions(-) diff --git a/Library/Extensions/Feature+Helpers.swift b/Library/Extensions/Feature+Helpers.swift index d3b83f95cc..7c7e986d0f 100644 --- a/Library/Extensions/Feature+Helpers.swift +++ b/Library/Extensions/Feature+Helpers.swift @@ -6,9 +6,6 @@ public func featureNativeCheckoutIsEnabled() -> Bool { } public func featureNativeCheckoutPledgeViewIsEnabled() -> Bool { - // native checkout pledge view is currently not available in release builds - guard !AppEnvironment.current.mainBundle.isRelease else { return false } - return Feature.nativeCheckoutPledgeView.isEnabled() } diff --git a/Library/Extensions/Feature+HelpersTests.swift b/Library/Extensions/Feature+HelpersTests.swift index 51123cd058..72eb16224f 100644 --- a/Library/Extensions/Feature+HelpersTests.swift +++ b/Library/Extensions/Feature+HelpersTests.swift @@ -56,43 +56,4 @@ final class FeatureHelpersTests: TestCase { XCTAssertFalse(featureNativeCheckoutPledgeViewIsEnabled()) } } - - func testFeatureNativeCheckoutPledgeViewEnabled_isFalse_ffIsFalse_inReleaseBuild() { - let testBundle = MockBundle.init( - bundleIdentifier: KickstarterBundleIdentifier.release.rawValue, - lang: "en" - ) - let config = Config.template - |> \.features .~ [Feature.nativeCheckoutPledgeView.rawValue: false] - - withEnvironment(config: config, mainBundle: testBundle) { - XCTAssertFalse(featureNativeCheckoutPledgeViewIsEnabled()) - } - } - - func testFeatureNativeCheckoutPledgeViewEnabled_isFalse_ffIsTrue_inReleaseBuild() { - let testBundle = MockBundle.init( - bundleIdentifier: KickstarterBundleIdentifier.release.rawValue, - lang: "en" - ) - let config = Config.template - |> \.features .~ [Feature.nativeCheckoutPledgeView.rawValue: true] - - withEnvironment(config: config, mainBundle: testBundle) { - XCTAssertFalse(featureNativeCheckoutPledgeViewIsEnabled()) - } - } - - func testFeatureNativeCheckoutPledgeViewEnabled_isFalse_ffIsNil_inReleaseBuild() { - let testBundle = MockBundle.init( - bundleIdentifier: KickstarterBundleIdentifier.release.rawValue, - lang: "en" - ) - let config = Config.template - |> \.features .~ [:] - - withEnvironment(config: config, mainBundle: testBundle) { - XCTAssertFalse(featureNativeCheckoutPledgeViewIsEnabled()) - } - } }