Skip to content

Commit eea9fbd

Browse files
committed
Update testSentryLogger.cfc
1 parent bd5b90d commit eea9fbd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/testSentryLogger.cfc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider" {
3232
);
3333
expect( logger ).toBeInstanceOf( "services.SentryLogger" );
3434

35-
// Should not actually send to Sentry
35+
// Should not actually send to Sentry but returns success
3636
var result = logger.logMessage(
3737
message = "Test message without DSN",
3838
level = "info"
3939
);
4040
expect( result ).toBeStruct();
4141
expect( result ).toHaveKey( "success" );
42-
expect( result.success ).toBeFalse(); // No DSN = not sent
42+
expect( result.success ).toBeTrue(); // Returns true but doesn't send
43+
expect( result ).toHaveKey( "note" ); // Should have a note explaining why
4344
});
4445

4546
it( title="should work with empty DSN string", body=function(){
@@ -53,7 +54,8 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider" {
5354
level = "info"
5455
);
5556
expect( result ).toBeStruct();
56-
expect( result.success ).toBeFalse();
57+
expect( result.success ).toBeTrue(); // Returns true but doesn't send
58+
expect( result ).toHaveKey( "note" ); // Should explain no DSN
5759
});
5860

5961
it( title="should fail with invalid DSN format", body=function(){

0 commit comments

Comments
 (0)