mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
9f827204df
closes #6094 - adds 404-handler mixin - applies mixin to settings/tags/tag, editor/edit and team/user routes - adds adapter-error test helper to override the default adapter error
19 lines
581 B
JavaScript
19 lines
581 B
JavaScript
import Ember from 'ember';
|
|
|
|
// This is needed for testing error responses in acceptance tests
|
|
// See http://williamsbdev.com/posts/testing-rsvp-errors-handled-globally/
|
|
|
|
let originalException;
|
|
let originalLoggerError;
|
|
|
|
export function errorOverride() {
|
|
originalException = Ember.Test.adapter.exception;
|
|
originalLoggerError = Ember.Logger.error;
|
|
Ember.Test.adapter.exception = function () {};
|
|
Ember.Logger.error = function () {};
|
|
}
|
|
|
|
export function errorReset() {
|
|
Ember.Test.adapter.exception = originalException;
|
|
Ember.Logger.error = originalLoggerError;
|
|
}
|