# Referencing a nested route using moduleFor in an ember test

**URL:** <https://discuss.emberjs.com/t/referencing-a-nested-route-using-modulefor-in-an-ember-test/6347>\
**Category:** Testing\
**Created:** [September 25, 2014, 7:12pm UTC](https://discuss.emberjs.com/t/referencing-a-nested-route-using-modulefor-in-an-ember-test/6347 "2014-09-25T19:12:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bennysghost](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bennysghost/32/9966_2.png) [@bennysghost](https://discuss.emberjs.com/u/bennysghost)\
**Post date:** [September 25, 2014, 7:12pm UTC](https://discuss.emberjs.com/t/referencing-a-nested-route-using-modulefor-in-an-ember-test/6347/1 "2014-09-25T19:12:16Z")

</div>

i have a nested route which is defined in my router map as

```
Router.map(function() {
    this.resource('account', function () {
        this.route('sign-up');
    };
});

```

i want to refer to this sign-up route in my unit tests, but i keep getting a route undefined error. i am using q-unit provided by ember-cli. my test resides in

```
tests/unit/routes/account/sign-up-test.js

```

and the test looks like:

```
import { test, moduleFor } from 'ember-qunit';

moduleFor('route:account/sign-up', 'Account/signupRoute', {
});

test('it exists', function() {
    var route = this.subject();
    ok(route);
});

```

i keep getting this error when running tests:

```
Setup failed on it exists: Attempting to register an unknown factory: `route:account/sign-up`

```

anyone know how to refer to a nested route using moduleFor?
