From 455abd25793ae22bdf3e1edf08cb89f70cb4f28a Mon Sep 17 00:00:00 2001
From: Mauricio Giacomini Girardello <mgg12@inf.ufpr.br>
Date: Tue, 17 May 2016 14:36:05 -0300
Subject: [PATCH] adding authenticate application helper method

---
 test/test_helper.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test_helper.rb b/test/test_helper.rb
index dfe4b91c..0e357f9b 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -23,10 +23,15 @@ class ActiveSupport::TestCase
 
   # authenticate requests using devise_token_auth
   def auth_request(user)
+    auth_application
     sign_in user
     request.headers.merge!(user.create_new_auth_token)
   end
 
+  def auth_application
+    @request.headers['PortalMEC-AppID'] = applications(:test_app).application_id
+  end
+
   def mock
     MiniTest::Mock.new
   end
-- 
GitLab