Skip to content

Commit

Permalink
Update SentryRedactModifierTests.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin committed Dec 10, 2024
1 parent 9519161 commit 6ffe9dc
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import XCTest

class SentryRedactModifierTests: XCTestCase {
func testViewMask() throws {
let redactedText = Text("Hello, World!").sentryReplayMask()
let description = String(describing: redactedText)
XCTAssertTrue(description.starts(with: "AnyView(ModifiedContent<Text, SentryReplayModifier>"), "Redacted text is \(description)")
let text = Text("Hello, World!")
let redactedText = text.sentryReplayMask()
XCTAssertTrue(redactedText is ModifiedContent<Text, SentryReplayModifier>)
}

func testViewUnmask() throws {
let unmaskedText = Text("Hello, World!").sentryReplayUnmask()
let description = String(describing: unmaskedText)
XCTAssertTrue(description.starts(with: "AnyView(ModifiedContent<Text, SentryReplayModifier>"), "Unmasked text is \(description)")
let text = Text("Hello, World!")
let redactedText = text.sentryReplayUnmask()
XCTAssertTrue(redactedText is ModifiedContent<Text, SentryReplayModifier>)
}
}

Expand Down

0 comments on commit 6ffe9dc

Please sign in to comment.