Add tests for adding interval setting automatically

Tests for #42.

Should I add some others tests?