Test that user agent is set correctly