Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/signup functional test #18

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Prev Previous commit
Next Next commit
Remove few thing
remove $q
remove makeDeferred
In this test both of them do not require.
  • Loading branch information
chaoen committed Mar 24, 2016
commit 5eee35950e0c51952497c8644d31548346293bf5
9 changes: 1 addition & 8 deletions src/components/auth/registerUser.functional.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import app from './../../index.js';
describe('register user functional test', function() {
let $rootScope;
let makeController;
let makeDeferred;
let makeDirective;
let makeTemplate
let $toast;
Expand All @@ -20,7 +19,7 @@ describe('register user functional test', function() {

beforeEach(angular.mock.module('app'));

beforeEach(inject(($q, _$rootScope_, _$toast_, _$state_, _$auth_, _$compile_, _AuthService_, _$httpBackend_) => {
beforeEach(inject((_$rootScope_, _$toast_, _$state_, _$auth_, _$compile_, _AuthService_, _$httpBackend_) => {
$rootScope = _$rootScope_;

$httpBackend = _$httpBackend_;
Expand All @@ -37,16 +36,10 @@ describe('register user functional test', function() {

makeTemplate = angular.element(signUpTemplate);

$rootScope.credentials = { email: null};

$compile(makeTemplate)($rootScope);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should compile the sign-up template into sign-up controller instead of $rootScope.


form = $rootScope.signup.form;

makeDeferred = () => {
return $q.defer();
};

makeController = () => {
return new signUpCtrl($auth, $state, $toast, AuthService);
};
Expand Down