Skip to content

FIRMessagingRemoteNotificationsProxyTest.m:testListeningForDelegateChangesOnInvalidUserNotificationCenter invalid test #14922

Open
@dmaclach

Description

@dmaclach

Description

https://github.com/firebase/firebase-ios-sdk/blob/e58e322f2ca7618aa81b215de4526d658ea1329a/FirebaseMessaging/Tests/UnitTests/FIRMessagingRemoteNotificationsProxyTest.m#L277C9-L277C71 is an invalid test.

  1. It sets a stub on a mock that is already stubbed for that method. That will fail silently
  2. it is calling a method on the delegate which is nil which will do nothing.

It will pass because it is based on OCMReject but since nothing is called this will always pass.

Reproducing the issue

N/A

Firebase SDK Version

All (tests)

Xcode Version

16

Installation Method

N/A

Firebase Product(s)

Messaging

Targeted Platforms

All

Relevant Log Output

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions