Skip to content

it 'should have a VideosCtrl controller' passes when App.VideosCtrl is undefined #34

@ruchoma

Description

@ruchoma

This is in the controllersSpec.js of unit testing controllers.

original code:
it('should have a VideosCtrl controller', function() {
expect(App.VideosCtrl).not.to.equal(null);
});

The issues is does the app have a VideosCtrl controller, or not?
The test passes even when I add the following 2 expectations:
expect(App.VideosCtrl).to.be.undefined;
expect(App.Nonexistant).not.to.equal(null);

How can this test be updated to truly reflect whether or not the VideosCtrl controller is bound to the App?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions