A minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES.
one covering the page, where the short URL should be used in the mail
and one, where neither short URL nor URL field in general is not available (aka like on the "view" page when viewing a paste) and ensure it can also place the URL (among the other fields) properly into the mail content
Alternatives
Additional context
May need some refactor now I think about it or at least the window.open method needs to be stubbed out, so it does not open a mail window with content, but can be tested whether it contains the result. Yeah that should be possible.
The problem
https://github.com/PrivateBin/PrivateBin/pull/1421 fixed a bug https://github.com/PrivateBin/PrivateBin/issues/1420, which could have been covered if a unit test would have been there.
The solution
Write (at least) two unit tests:
Alternatives
Additional context
May need some refactor now I think about it or at least the
window.open
method needs to be stubbed out, so it does not open a mail window with content, but can be tested whether it contains the result. Yeah that should be possible.