Skip to content

Commit

Permalink
Add missing mock
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaresiak committed Dec 21, 2023
1 parent 64b8ad7 commit 6290ed0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions DuckDuckGo/ContentBlocker/Mocks/MockPrivacyConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,18 @@ final class MockPrivacyConfiguration: PrivacyConfiguration {
func userDisabledProtection(forDomain: String) {}
}

final class MockInternalUserStoring: InternalUserStoring {
var isInternalUser: Bool = false
}

extension DefaultInternalUserDecider {
convenience init(mockedStore: MockInternalUserStoring = MockInternalUserStoring()) {
self.init(store: mockedStore)
}
}

final class MockPrivacyConfigurationManager: NSObject, PrivacyConfigurationManaging {

Check failure on line 65 in DuckDuckGo/ContentBlocker/Mocks/MockPrivacyConfiguration.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Lines should not have trailing whitespace (trailing_whitespace)
var embeddedConfigData: BrowserServicesKit.PrivacyConfigurationManager.ConfigurationData {
fatalError("not implemented")
}
Expand All @@ -70,6 +81,7 @@ final class MockPrivacyConfigurationManager: NSObject, PrivacyConfigurationManag

var updatesPublisher: AnyPublisher<Void, Never> = Just(()).eraseToAnyPublisher()
var privacyConfig: PrivacyConfiguration = MockPrivacyConfiguration()
var internalUserDecider: InternalUserDecider = DefaultInternalUserDecider()
}

#endif

0 comments on commit 6290ed0

Please sign in to comment.