Sha256: 92833acbb81903b7343b5b4a1965878acb6d0ccb4a14f2f062472d92ee3f8df5

Contents?: true

Size: 1.68 KB

Versions: 21

Compression:

Stored size: 1.68 KB

Contents

import {appName} from 'config';
import {} from '../../../src/app/auth/registrations/registrations.js';
import {} from '../../support/testStates.js';

describe('registrations states', function() {

  var $rootScope, $state, $injector, state, $auth, $q;

  beforeEach(function() {

    module(`${appName}.testStates`);

    module(`${appName}.auth.registrations`);

    inject(function(_$rootScope_, _$state_, _$injector_, $templateCache, _$q_, _$auth_) {
      $rootScope = _$rootScope_;
      $state = _$state_;
      $injector = _$injector_;
      $q = _$q_;

      $auth = _$auth_;

      $templateCache.put('auth/registrations/registrations.tpl.html', '');
      $templateCache.put('auth/registrations/registrations-success.tpl.html', '');
    });
  });

  describe("registrations", function() {

    beforeEach(function() {
      state = $state.get('root.inner.registrations');
    });

    it('should respond to URL', function() {
      expect($state.href(state)).toEqual('#/sign-up');
    });

    it('should render the sessions template', function() {
      expect(state.templateUrl).toEqual('auth/registrations/registrations.tpl.html');
    });

    it('should use the sessions controller', function() {
      expect(state.controller).toEqual('RegistrationsCtrl');
    });

  });

  describe("registrationsSuccess", function() {

    beforeEach(function() {
      state = $state.get('root.inner.registrationsSuccess');
    });

    it('should respond to URL', function() {
      expect($state.href(state)).toEqual('#/signed-up');
    });

    it('should render the sessions template', function() {
      expect(state.templateUrl).toEqual('auth/registrations/registrations-success.tpl.html');
    });

  });

});

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
xing-framework-1.0.0.pre.beta.1 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-1.0.0.pre.beta default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-1.0.0.pre.alpha default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.3.2 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.3.1 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.3.0 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.9 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.9.beta1 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.8 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.8.beta1 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.7 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.7.pre.beta1 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.6 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.5 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.4 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.3 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.2 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.1 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.2.0 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js
xing-framework-0.0.3 default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js