Commit e5a7ed3a authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Review changes

parent 12fbce2e
...@@ -5,7 +5,7 @@ const index = function index() { ...@@ -5,7 +5,7 @@ const index = function index() {
sentryDsn: gon.sentry_dsn, sentryDsn: gon.sentry_dsn,
currentUserId: gon.current_user_id, currentUserId: gon.current_user_id,
whitelistUrls: [gon.gitlab_url], whitelistUrls: [gon.gitlab_url],
isProduction: gon.is_production, isProduction: process.env.NODE_ENV,
}); });
return RavenConfig; return RavenConfig;
......
...@@ -12,7 +12,6 @@ module Gitlab ...@@ -12,7 +12,6 @@ module Gitlab
gon.katex_js_url = ActionController::Base.helpers.asset_path('katex.js') gon.katex_js_url = ActionController::Base.helpers.asset_path('katex.js')
gon.sentry_dsn = current_application_settings.clientside_sentry_dsn if current_application_settings.clientside_sentry_enabled gon.sentry_dsn = current_application_settings.clientside_sentry_dsn if current_application_settings.clientside_sentry_enabled
gon.gitlab_url = Gitlab.config.gitlab.url gon.gitlab_url = Gitlab.config.gitlab.url
gon.is_production = Rails.env.production?
if current_user if current_user
gon.current_user_id = current_user.id gon.current_user_id = current_user.id
......
...@@ -18,9 +18,10 @@ describe('RavenConfig options', () => { ...@@ -18,9 +18,10 @@ describe('RavenConfig options', () => {
sentry_dsn: sentryDsn, sentry_dsn: sentryDsn,
current_user_id: currentUserId, current_user_id: currentUserId,
gitlab_url: gitlabUrl, gitlab_url: gitlabUrl,
is_production: isProduction,
}; };
process.env.NODE_ENV = isProduction;
spyOn(RavenConfig, 'init'); spyOn(RavenConfig, 'init');
indexReturnValue = index(); indexReturnValue = index();
......
...@@ -157,10 +157,6 @@ describe('RavenConfig', () => { ...@@ -157,10 +157,6 @@ describe('RavenConfig', () => {
RavenConfig.bindRavenErrors(); RavenConfig.bindRavenErrors();
}); });
it('should query for document using jquery', () => {
expect(window.$).toHaveBeenCalledWith(document);
});
it('should call .on', function () { it('should call .on', function () {
expect($document.on).toHaveBeenCalledWith('ajaxError.raven', RavenConfig.handleRavenErrors); expect($document.on).toHaveBeenCalledWith('ajaxError.raven', RavenConfig.handleRavenErrors);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment