Skip to content

Commit f822a4c

Browse files
committed
Fix failing ActiveStore specs
1 parent a0724f1 commit f822a4c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

specs/ActiveStore.spec.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require('./helper');
2-
var Route = require('../modules/Route');
32
var ActiveStore = require('../modules/stores/ActiveStore');
3+
var Route = require('../modules/components/Route');
44

55
var App = React.createClass({
66
displayName: 'App',
@@ -10,14 +10,15 @@ var App = React.createClass({
1010
});
1111

1212
describe('when a Route is active', function () {
13+
var route;
1314
beforeEach(function () {
14-
Route.clearNamedRoutes();
15+
route = Route({ name: 'products', handler: App });
1516
});
1617

1718
describe('and it has no params', function () {
1819
beforeEach(function () {
1920
ActiveStore.update({
20-
routes: [ new Route({ name: 'products', handler: App }) ]
21+
activeRoutes: [ route ]
2122
});
2223
});
2324

@@ -29,9 +30,9 @@ describe('when a Route is active', function () {
2930
describe('and the right params are given', function () {
3031
beforeEach(function () {
3132
ActiveStore.update({
32-
routes: [ new Route({ name: 'products', handler: App }) ],
33-
params: { id: '123', show: 'true' },
34-
query: { search: 'abc' }
33+
activeRoutes: [ route ],
34+
activeParams: { id: '123', show: 'true' },
35+
activeQuery: { search: 'abc' }
3536
});
3637
});
3738

@@ -57,8 +58,8 @@ describe('when a Route is active', function () {
5758
describe('and the wrong params are given', function () {
5859
beforeEach(function () {
5960
ActiveStore.update({
60-
routes: [ new Route({ name: 'products', handler: App }) ],
61-
params: { id: 123 }
61+
activeRoutes: [ route ],
62+
activeParams: { id: 123 }
6263
});
6364
});
6465

0 commit comments

Comments
 (0)