Skip to content

Commit

Permalink
SubscriptionEnvironment in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
afterxleep committed Apr 4, 2024
1 parent ad8e2ff commit 245c8cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DuckDuckGoTests/TabURLInterceptorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class TabURLInterceptorDefaultTests: XCTestCase {

override func setUp() {
super.setUp()
// Simulate purchase allowance
SubscriptionPurchaseEnvironment.canPurchase = true
urlInterceptor = TabURLInterceptorDefault()
}

Expand All @@ -51,9 +53,6 @@ class TabURLInterceptorDefaultTests: XCTestCase {
let url = URL(string: "https://duckduckgo.com/pro")!
let canNavigate = urlInterceptor.allowsNavigatingTo(url: url)

// Simulate purchase allowance
SubscriptionPurchaseEnvironment.canPurchase = true

// Fail if no note is posted
XCTAssertFalse(canNavigate)

Expand Down

0 comments on commit 245c8cf

Please sign in to comment.