Skip to content
This repository was archived by the owner on Dec 5, 2017. It is now read-only.

mainmatter/ember-cli-simple-auth-testing

Repository files navigation

Ember Simple Auth Testing

This repository is deprecated. Ember Simple Auth 1.0 is distributed as an Ember CLI Addon that contains all of the previously individual parts of the library.

This is an npm package that contains the Ember Simple Auth Testing extension library packaged as an Ember CLI Addon.

Installation

Ember Simple Auth testing requires at least Ember CLI 0.0.47

To install simply run

ember install ember-cli-simple-auth
ember install ember-cli-simple-auth-testing

in your Ember CLI project's root.

If you're using Ember CLI 0.2.2 or older, run

ember install:addon ember-cli-simple-auth
ember install:addon ember-cli-simple-auth-testing

If you're using Ember CLI 0.1.4 or older, run

npm install --save-dev ember-cli-simple-auth
ember generate ember-cli-simple-auth
npm install --save-dev ember-cli-simple-auth-testing
ember generate ember-cli-simple-auth-testing

You also need to import the helpers - preferrably in the app's tests/helpers/start-app.js file:



import initializeTestHelpers from 'simple-auth-testing/test-helpers';
initializeTestHelpers();

export default function startApp(attrs) {
  

Configuration

When using the testing helpers also make sure to use the ephemeral session store for the test environment as otherwise the session will be persisted and tests might influence each other.

//config/environment.js
if (environment === 'test') {
  ENV['simple-auth'] = {
    store: 'simple-auth-session-store:ephemeral'
  }
}

For the actual Ember Simple Auth repository see https://github.com/simplabs/ember-simple-auth