Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Oct 10, 2014
1 parent 6b9982c commit bd23312
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
12 changes: 10 additions & 2 deletions modules/components/__tests__/Link-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ describe('A Link', function () {
)
);

component.dispatch('/mjackson/home', done);
component.dispatch('/mjackson/home', function (error, abortReason, nextState) {
expect(error).toBe(null);
expect(abortReason).toBe(null);
component.setState(nextState, done);
});
});

afterEach(function () {
Expand Down Expand Up @@ -52,7 +56,11 @@ describe('A Link', function () {
)
);

component.dispatch('/', done);
component.dispatch('/', function (error, abortReason, nextState) {
expect(error).toBe(null);
expect(abortReason).toBe(null);
component.setState(nextState, done);
});
});

afterEach(function () {
Expand Down
26 changes: 21 additions & 5 deletions modules/mixins/__tests__/Navigation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ describe('Navigation', function () {
var component;
beforeEach(function (done) {
component = ReactTestUtils.renderIntoDocument(
Routes({ location: 'none' },
Routes({ location: 'none', onChange: done },
Route({ name: 'home', path: '/:username/home', handler: NavigationHandler })
)
);

component.dispatch('/anybody/home', done);
component.dispatch('/anybody/home', function (error, abortReason, nextState) {
expect(error).toBe(null);
expect(abortReason).toBe(null);
component.setState(nextState, done);
});
});

afterEach(function () {
Expand All @@ -50,7 +54,11 @@ describe('Navigation', function () {
)
);

component.dispatch('/home', done);
component.dispatch('/home', function (error, abortReason, nextState) {
expect(error).toBe(null);
expect(abortReason).toBe(null);
component.setState(nextState, done);
});
});

afterEach(function () {
Expand Down Expand Up @@ -78,7 +86,11 @@ describe('Navigation', function () {
)
);

component.dispatch('/home', done);
component.dispatch('/home', function (error, abortReason, nextState) {
expect(error).toBe(null);
expect(abortReason).toBe(null);
component.setState(nextState, done);
});
});

afterEach(function () {
Expand All @@ -101,7 +113,11 @@ describe('Navigation', function () {
)
);

component.dispatch('/home', done);
component.dispatch('/home', function (error, abortReason, nextState) {
expect(error).toBe(null);
expect(abortReason).toBe(null);
component.setState(nextState, done);
});
});

afterEach(function () {
Expand Down

0 comments on commit bd23312

Please sign in to comment.