mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-13 14:39:52 +03: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
20 lines
581 B
JavaScript
20 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;
|
|
}
|