- post :new,
- :params => { :display_name => recipient_user.display_name,
- :message => { :title => "Test Message", :body => "Test message body" } }
- assert_response :success
- assert_template "new"
- assert_select ".error", /wait a while/
+ perform_enqueued_jobs do
+ post messages_path(:display_name => recipient_user.display_name,
+ :message => { :title => "Test Message", :body => "Test message body" })
+ assert_response :success
+ assert_template "new"
+ assert_select ".error", /wait a while/
+ end