Adding tests for log_activity