Skip to content

Queue::pushedJobs() no-op in AssetUploadedListenerTest #64

@robocopklaus

Description

@robocopklaus

Summary

AssetUploadedListenerTest.php:69 calls Queue::pushedJobs() which returns data but doesn't assert anything. The result is discarded. However, line 68 already correctly asserts the same thing via expect($pushedJobs->count())->toBe(1), so this is dead code rather than a missing assertion.

Problem

// Line 68 - this correctly asserts (GOOD)
expect($pushedJobs->count())->toBe(1);

// Line 69 - this is a no-op (dead code)
Queue::pushedJobs(GenerateAltTextJob::class, 1);

Suggested Fix

Either replace with a proper assertion or remove the dead line:

Queue::assertPushed(GenerateAltTextJob::class, 1);

References

  • File: tests/Unit/AssetUploadedListenerTest.php:69
  • Consolidated review finding: V5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglowLow severity findingtestingTest-related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions