Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ final class DashboardBloganuaryCardCellTests: CoreDataTestCase {

override func setUp() {
super.setUp()
try? featureFlags.override(RemoteFeatureFlag.bloganuaryDashboardNudge, withValue: true)
featureFlags.override(RemoteFeatureFlag.bloganuaryDashboardNudge, withValue: true)
}

override func tearDown() {
super.tearDown()
try? featureFlags.override(RemoteFeatureFlag.bloganuaryDashboardNudge,
withValue: RemoteFeatureFlag.bloganuaryDashboardNudge.defaultValue)
featureFlags.override(RemoteFeatureFlag.bloganuaryDashboardNudge, withValue: RemoteFeatureFlag.bloganuaryDashboardNudge.defaultValue)
}

// MARK: - `shouldShowCard` tests
Expand All @@ -27,7 +26,7 @@ final class DashboardBloganuaryCardCellTests: CoreDataTestCase {
let blog = makeBlog()
makeBloggingPromptSettings()
try mainContext.save()
try featureFlags.override(RemoteFeatureFlag.bloganuaryDashboardNudge, withValue: false)
featureFlags.override(RemoteFeatureFlag.bloganuaryDashboardNudge, withValue: false)

// When
let result = DashboardBloganuaryCardCell.shouldShowCard(for: blog, date: sometimeInDecember)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ class DashboardJetpackSocialCardCellTests: CoreDataTestCase {
override func setUp() {
super.setUp()

try? featureFlags.override(RemoteFeatureFlag.jetpackSocialImprovements, withValue: true)
featureFlags.override(RemoteFeatureFlag.jetpackSocialImprovements, withValue: true)
}

override func tearDown() {
super.tearDown()

try? featureFlags.override(RemoteFeatureFlag.jetpackSocialImprovements,
withValue: RemoteFeatureFlag.jetpackSocialImprovements.defaultValue)
featureFlags.override(RemoteFeatureFlag.jetpackSocialImprovements, withValue: RemoteFeatureFlag.jetpackSocialImprovements.defaultValue)
}

// MARK: - `shouldShowCard` tests
Expand All @@ -33,7 +32,7 @@ class DashboardJetpackSocialCardCellTests: CoreDataTestCase {
let blog = createTestBlog()

// When
try featureFlags.override(RemoteFeatureFlag.jetpackSocialImprovements, withValue: false)
featureFlags.override(RemoteFeatureFlag.jetpackSocialImprovements, withValue: false)

// Then
XCTAssertFalse(shouldShowCard(for: blog))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ class ReminderScheduleCoordinatorTests: CoreDataTestCase {
private extension ReminderScheduleCoordinatorTests {

func disableBloggingPrompts() {
try! flagOverrideStore.override(FeatureFlag.bloggingPrompts, withValue: false)
flagOverrideStore.override(FeatureFlag.bloggingPrompts, withValue: false)
}

func enableBloggingPrompts(with behavior: MockSchedulerBehavior) {
try! flagOverrideStore.override(FeatureFlag.bloggingPrompts, withValue: true)
flagOverrideStore.override(FeatureFlag.bloggingPrompts, withValue: true)
let (hour, minute) = behavior.timeComponents
makePromptSettings(enabled: true, schedule: behavior.scheduleToReturn, hour: hour, minute: minute)
}
Expand Down