Skip to content

Testmode not correctly initialized from global setting #394

Description

@aisler-ma

In Release 1.4.1, the global test_mode setting was implemented to be respected. In the initial implementation !!Mailgun.test_mode was used, which correctly initialized the setting. Later in 1.4.2, ruboco was added and with it an erroneous fix was implemented: now the testmode is inited with !Mailgun.test_mode.nil?. This is in fact not logically identical and thus the test mode is enabled with any other value than nil and only disabled with nil. Assigning it to false will thus result in an enabled test mode! Regression added in 3c9c497

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions