# Acceptance Test Session Store Ember Simple Auth

**URL:** <https://discuss.emberjs.com/t/acceptance-test-session-store-ember-simple-auth/15683>\
**Category:** Questions\
**Created:** [October 19, 2018, 5:28pm UTC](https://discuss.emberjs.com/t/acceptance-test-session-store-ember-simple-auth/15683 "2018-10-19T17:28:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrock2004](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jrock2004/32/12133_2.png) [@jrock2004](https://discuss.emberjs.com/u/jrock2004)\
**Post date:** [October 19, 2018, 5:28pm UTC](https://discuss.emberjs.com/t/acceptance-test-session-store-ember-simple-auth/15683/1 "2018-10-19T17:28:17Z")

</div>

So I am trying to write an acceptance test for my ember app. I use Ember Simple Auth and in the route I have the following code

```auto
let session = getOwner(this).lookup('session:main'),
      sessionStore = this.get('session.store');

sessionStore.updateKey("my-app");

```

When I am running the app it works just fine. Now when I write the following test I get errors that `updateKey` is not a function

```auto
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { currentSession } from 'ember-simple-auth/test-support';

module('Acceptance | service menu', function(hooks) {
  setupApplicationTest(hooks);
  setupMirage(hooks);

  test('visiting /service-menu', async function(assert) {
    this.server.createList('service-category', 5);
    this.server.create('location');

    currentSession(this.application);

    await visit('/location/testLocation/service-menu');

    await this.pauseTest();

    assert.equal(currentURL(), '/location/testLocation/service-menu');
  });
});

```

What am I missing? I do not want the user to be logged in.

---

<div class="post-metadata">

**Author:** ![ef4](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ef4/32/13470_2.png) [@ef4](https://discuss.emberjs.com/u/ef4)\
**Post date:** [October 23, 2018, 2:45pm UTC](https://discuss.emberjs.com/t/acceptance-test-session-store-ember-simple-auth/15683/2 "2018-10-23T14:45:46Z")

</div>

I started researching a reply to this but then saw there is already [an answer from the ESA maintainers](https://github.com/simplabs/ember-simple-auth/issues/1685).

---

<div class="post-metadata">

**Author:** ![jrock2004](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jrock2004/32/12133_2.png) [@jrock2004](https://discuss.emberjs.com/u/jrock2004)\
**Post date:** [October 23, 2018, 3:12pm UTC](https://discuss.emberjs.com/t/acceptance-test-session-store-ember-simple-auth/15683/3 "2018-10-23T15:12:15Z")

</div>

Yes, thanks @ef4 it seems that test use in memory. I am taking from how he closed it that any custom code on top like the `updateKey` function we have will not be visible in test.
