Content
View differences
Updated by Jens Ulferts about 12 years ago
At [this](https://github.com/opf/openproject/blob/8b096975fe7483a6f3c8f94936034afbc6d2b117/lib/open_project/journal_formatter/diff.rb#L74) spot (to be more precise within \#default\_options) the diff formatter for journals discards all incoming options except *:only\_path*.
Fixing this, however, breaks the [user\_mailer\_test](https://github.com/opf/openproject/blob/8b096975fe7483a6f3c8f94936034afbc6d2b117/test/functional/user_mailer_test.rb#L94-L122) in 3 cases.
As for why, I believe this is because the test always tests for HTML links. The test is run for both text and html emails, though. The only reason it doesn’t fail with this bug is that *:no\_html* is always false (since it is discarded) and therefore HTML will be rendered in any case.
I.e. there is a bug in diff.rb, the test relies on it and is therefore wrong.
I couldn’t quite figure out the consequences outside the test, yet.
It might be a good idea for someone else to look into it.
Fixing this, however, breaks the [user\_mailer\_test](https://github.com/opf/openproject/blob/8b096975fe7483a6f3c8f94936034afbc6d2b117/test/functional/user_mailer_test.rb#L94-L122) in 3 cases.
As for why, I believe this is because the test always tests for HTML links. The test is run for both text and html emails, though. The only reason it doesn’t fail with this bug is that *:no\_html* is always false (since it is discarded) and therefore HTML will be rendered in any case.
I.e. there is a bug in diff.rb, the test relies on it and is therefore wrong.
I couldn’t quite figure out the consequences outside the test, yet.
It might be a good idea for someone else to look into it.