Merge pull request #66 from satoryu/fix_test_fails_in_travis
Fix test fails in travis
This commit is contained in:
Коммит
29509a4c73
|
@ -12,7 +12,7 @@ rvm:
|
|||
cache: bundler
|
||||
|
||||
before_install:
|
||||
- gem install bundler
|
||||
- gem install bundler -v 1.17.3
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
|
|
|
@ -29,7 +29,7 @@ module ApplicationInsights
|
|||
|
||||
private
|
||||
def embedded_script_code
|
||||
<<~"SCRIPT"
|
||||
<<-"SCRIPT"
|
||||
<script type="text/javascript">
|
||||
var appInsights=window.appInsights||function(a){
|
||||
function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply(c,b)})}}var c={config:a},d=document,e=window;setTimeout(function(){var b=d.createElement("script");b.src=a.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js",d.getElementsByTagName("script")[0].parentNode.appendChild(b)});try{c.cookie=d.cookie}catch(a){}c.queue=[];for(var f=["Event","Exception","Metric","PageView","Trace","Dependency"];f.length;)b("track"+f.pop());if(b("setAuthenticatedUserContext"),b("clearAuthenticatedUserContext"),b("startTrackEvent"),b("stopTrackEvent"),b("startTrackPage"),b("stopTrackPage"),b("flush"),!a.disableExceptionTracking){f="onerror",b("_"+f);var g=e[f];e[f]=function(a,b,d,e,h){var i=g&&g(a,b,d,e,h);return!0!==i&&c["_"+f](a,b,d,e,h),i}}return c
|
||||
|
|
|
@ -73,7 +73,10 @@ class TestInjectJavaScriptTracking < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
private
|
||||
def generate_dummy_app(status: 200, headers: {}, body:)
|
||||
def generate_dummy_app(args)
|
||||
status = args[:status] || 200
|
||||
headers = args[:headers] || {}
|
||||
body = args[:body]
|
||||
unless headers.key?('Content-Type')
|
||||
headers['Content-Type'] = 'text/html'
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче