Review changes
This commit is contained in:
parent
12fbce2eac
commit
e5a7ed3ac3
4 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue