Review changes

This commit is contained in:
Luke "Jared" Bennett 2017-05-05 15:55:55 +01:00
parent 12fbce2eac
commit e5a7ed3ac3
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
4 changed files with 3 additions and 7 deletions

View file

@ -5,7 +5,7 @@ const index = function index() {
sentryDsn: gon.sentry_dsn,
currentUserId: gon.current_user_id,
whitelistUrls: [gon.gitlab_url],
isProduction: gon.is_production,
isProduction: process.env.NODE_ENV,
});
return RavenConfig;

View file

@ -12,7 +12,6 @@ module Gitlab
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.gitlab_url = Gitlab.config.gitlab.url
gon.is_production = Rails.env.production?
if current_user
gon.current_user_id = current_user.id

View file

@ -18,9 +18,10 @@ describe('RavenConfig options', () => {
sentry_dsn: sentryDsn,
current_user_id: currentUserId,
gitlab_url: gitlabUrl,
is_production: isProduction,
};
process.env.NODE_ENV = isProduction;
spyOn(RavenConfig, 'init');
indexReturnValue = index();

View file

@ -157,10 +157,6 @@ describe('RavenConfig', () => {
RavenConfig.bindRavenErrors();
});
it('should query for document using jquery', () => {
expect(window.$).toHaveBeenCalledWith(document);
});
it('should call .on', function () {
expect($document.on).toHaveBeenCalledWith('ajaxError.raven', RavenConfig.handleRavenErrors);
});