Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('RegistrationCtrl', function () {
- 'use strict';
- beforeEach(angular.module('quiz'));
- var $controller;
- var mockedUser ={
- name: 'kinga',
- surname: 'kinga',
- email: 'lll@ll.ll',
- password: 'lll'
- };
- beforeEach(inject(function(_$controller_){
- // The injector unwraps the underscores (_) from around the parameter names when matching
- $controller = _$controller_;
- }));
- describe('$scope.registerUser', function(){
- it('should check if passwords are the same', function(){
- var $scope = {};
- var controller = $controller('RegistrationCtrl', {$scope: $scope});
- $scope.formData.password = mockedUser.password;
- $scope.confirmPassword = 'lll';
- $scope.registerUser();
- expect();
- })
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement