How to test for a boolean field in a twig template? field_boolean is a boolean field.

{% if content.field_boolean == true %} or {% if content.field_boolean == 1 %} or {% if content.field_boolean == 'true' %} or {% if content.field_boolean == '1' %} don't work.

How do I test if the checkbox is checked?
You want to look at the raw value, not the render array.

Example:

{% if node.field_foo is not empty %}

This checks if the field exists. The render array won't be useful beyond rendering values.

Don't look at content - that is simply the render array. Look at the fields in your entity object (node, paragraph, etc). You might want to install Twig XDebug to breakpoint your templates or inspect variables in mytheme.theme.

You should be able to look at {% if node.field_foo.value ... %} for equality checking.