diff --git a/addon/validators/base.js b/addon/validators/base.js index b14a9ef0..15b76566 100644 --- a/addon/validators/base.js +++ b/addon/validators/base.js @@ -434,16 +434,14 @@ export default Base; * ```javascript * // tests/unit/validators/unique-username-test.js * - * import Ember from 'ember'; - * import { moduleFor, test } from 'ember-qunit'; - * - * moduleFor('validator:unique-username', 'Unit | Validator | unique-username', { - * needs: ['validator:messages'] - * }); + * import { module, test } from "qunit"; * - * test('it works', function(assert) { - * const validator = this.subject(); - * assert.ok(validator); + * module("Unit | Validator | unique-username", function() { + * test('it works', function(assert) { + * assert.expect(1); + * const validator = this.owner.lookup("validator:unique-username"); + * assert.ok(validator); + * }) * }); * ``` * @@ -452,8 +450,7 @@ export default Base; * ```javascript * test('username is unique', function(assert) { * assert.expect(1); - * - * let validator = this.subject(); + * let validator = this.owner.lookup("validator:unique-username"); * let done = assert.async(); * * validator.validate('johndoe42').then((message) => {