Tests for tweet action. Refactor error message display to use the flash.