Skip to content

Commit

Permalink
fix: Incorrect path to fetch the routeAfterAuthentication property in…
Browse files Browse the repository at this point in the history
… the config object (#2215)

* Incorrect path to fetch the routeAfterAuthentication property in the config object.

* Should fix broken configuration test.
  • Loading branch information
Luis Manuel Averhoff committed Jun 19, 2020
1 parent 9352151 commit 3ac64c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/ember-simple-auth/addon/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export default {

load(config) {
this.rootURL = getWithDefault(config, 'rootURL', DEFAULTS.rootURL);
this.routeAfterAuthentication = getWithDefault(config, 'ember-simple-auth.routeAfterAuthentication', DEFAULTS.routeAfterAuthentication);
}
this.routeAfterAuthentication = getWithDefault(
config,
'routeAfterAuthentication',
DEFAULTS.routeAfterAuthentication
);
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Configuration', () => {
});

it('sets routeAfterAuthentication correctly', function() {
Configuration.load({ 'ember-simple-auth': { routeAfterAuthentication: '/some-route' } });
Configuration.load({ routeAfterAuthentication: '/some-route' });

expect(Configuration.routeAfterAuthentication).to.eql('/some-route');
});
Expand Down

0 comments on commit 3ac64c3

Please sign in to comment.