Skip to content

Commit

Permalink
Merge pull request #7960 from jrjohnson/fix-controller-tests
Browse files Browse the repository at this point in the history
Import Controller for Tests
  • Loading branch information
stopfstedt committed Jul 12, 2024
2 parents b26f22f + 67a7b2f commit d62af63
Show file tree
Hide file tree
Showing 30 changed files with 147 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/admin-dashboard';

module('Unit | Controller | AdminDashboard ', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:admin-dashboard', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
var controller = this.owner.lookup('controller:admin-dashboard');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/assign-students';

module('Unit | Controller | assign students', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:assign-students', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:assign-students');
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/tests/unit/controllers/courses-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/courses';

module('CoursesController', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:courses', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
var controller = this.owner.lookup('controller:courses');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/curriculum-inventory-report/index';

module('Unit | Controller | curriculum inventory report/index', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:curriculum-inventory-report/index', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:curriculum-inventory-report/index');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/curriculum-inventory-report/rollover';

module('Unit | Controller | curriculum inventory report/rollover', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:curriculum-inventory-report/rollover', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:curriculum-inventory-report/rollover');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/curriculum-inventory-reports';

module('Unit | Controller | curriculum-inventory-reports', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:curriculum-inventory-reports', Controller);
});

test('it renders', async function (assert) {
const controller = this.owner.lookup('controller:curriculum-inventory-reports');
assert.ok(controller);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/curriculum-inventory-sequence-block';

module('Unit | Controller | curriculum inventory sequence block', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:curriculum-inventory-sequence-block', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:curriculum-inventory-sequence-block');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/instructor-groups';

module('Unit | Controller | InstructorGroups ', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:instructor-groups', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
var controller = this.owner.lookup('controller:instructorGroups');
var controller = this.owner.lookup('controller:instructor-groups');
assert.ok(controller);
});
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/learner-groups';

module('Unit | Controller | learner group', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:learner-group', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:learner-group');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/learner-groups';

module('Unit | Controller | LearnerGroups ', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:learner-groups', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
var controller = this.owner.lookup('controller:learnerGroups');
var controller = this.owner.lookup('controller:learner-groups');
assert.ok(controller);
});
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/pending-user-updates';

module('Unit | Controller | pending user updates', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:pending-user-updates', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:pending-user-updates');
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/tests/unit/controllers/program-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/program';

module('Unit | Controller | Program ', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:program', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
var controller = this.owner.lookup('controller:program');
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/tests/unit/controllers/reports-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'frontend/tests/helpers';
import Controller from 'frontend/controllers/reports';

module('Unit | Controller | reports', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:reports', Controller);
});

// TODO: Replace this with your real tests.
test('it exists', function (assert) {
let controller = this.owner.lookup('controller:reports');
Expand Down
12 changes: 0 additions & 12 deletions packages/frontend/tests/unit/controllers/reports/subject.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/frontend/tests/unit/controllers/school-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/school';

module('Unit | Controller | school', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:school', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:school');
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/tests/unit/controllers/search-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/search';

module('Unit | Controller | search', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:search', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:search');
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/tests/unit/controllers/user-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'frontend/controllers/user';

module('Unit | Controller | user', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:user', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:user');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/course-materials';

module('Unit | Controller | course-materials', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:course-materials', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:course-materials');
Expand Down
5 changes: 5 additions & 0 deletions packages/test-app/tests/unit/controllers/course-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/course';

module('Unit | Controller | course', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:course', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:course');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/course-visualize-instructors';

module('Unit | Controller | course-visualize-instructors', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:course-visualize-instructors', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:course-visualize-instructors');
Expand Down
5 changes: 5 additions & 0 deletions packages/test-app/tests/unit/controllers/course/index-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/course/index';

module('Unit | Controller | course/index', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:course/index', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:course/index');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/course/publishall';

module('Unit | Controller | course/publishall', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:course/publishal', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:course/publishall');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/course/rollover';

module('Unit | Controller | course/rollover', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:course/rollover', Controller);
});

// Replace this with your real tests.
test('it exists', function (assert) {
const controller = this.owner.lookup('controller:course/rollover');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/dashboard/calendar';

module('Unit | Controller | dashboard/calendar', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:dashboard/calendar', Controller);
});

// TODO: Replace this with your real tests.
test('it exists', function (assert) {
let controller = this.owner.lookup('controller:dashboard/calendar');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Controller from 'ilios-common/controllers/dashboard/materials';

module('Unit | Controller | dashboard/materials', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:dashboard/materials', Controller);
});

// TODO: Replace this with your real tests.
test('it exists', function (assert) {
let controller = this.owner.lookup('controller:dashboard/materials');
Expand Down
5 changes: 5 additions & 0 deletions packages/test-app/tests/unit/controllers/events-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'test-app/tests/helpers';
import Controller from 'ilios-common/controllers/events';

module('Unit | Controller | events', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('controller:events', Controller);
});

// TODO: Replace this with your real tests.
test('it exists', function (assert) {
let controller = this.owner.lookup('controller:events');
Expand Down
Loading

0 comments on commit d62af63

Please sign in to comment.