Add tests for has_changes