Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
29c0a60c
Commit
29c0a60c
authored
Jul 01, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
karma conf test path değiştirildi
test dependency'leri yeni structure'a göre düzenlendi
parent
b3cb340e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
20 deletions
+52
-20
auth_test.js
app/components/auth/auth_test.js
+6
-4
staff_controller_test.js
app/components/staff/staff_controller_test.js
+22
-12
form_service_test.js
app/zetalib/forms/form_service_test.js
+19
-2
karma.conf.js
karma.conf.js
+5
-2
No files found.
app/components/auth/auth_test.js
View file @
29c0a60c
...
...
@@ -9,14 +9,16 @@
// TODO: fill up the test cases correctly
describe
(
'zaerp.
login
module'
,
function
()
{
describe
(
'zaerp.
auth
module'
,
function
()
{
beforeEach
(
module
(
'zaerp.login'
));
// load dependencies of modules e.g REST_URL
beforeEach
(
module
(
'zaerp'
));
beforeEach
(
module
(
'zaerp.auth'
));
describe
(
'login controller'
,
function
()
{
describe
(
'login controller
and service
'
,
function
()
{
it
(
'should have a login controller'
,
inject
(
function
()
{
expect
(
'zaerp.
login
.LoginCtrl'
).
toBeDefined
();
expect
(
'zaerp.
auth
.LoginCtrl'
).
toBeDefined
();
}));
it
(
'should validate email'
,
inject
([
'LoginService'
,
...
...
app/components/staff/staff_controller_test.js
View file @
29c0a60c
...
...
@@ -8,20 +8,30 @@
'use strict'
;
describe
(
'staff controller module'
,
function
()
{
beforeEach
(
module
(
'zaerp.staff'
));
var
$controller
;
beforeEach
(
inject
(
function
(
_$controller_
)
{
// The injector unwraps the underscores (_) from around the parameter names when matching
beforeEach
(
inject
(
function
(
_$controller_
){
$controller
=
_$controller_
;
}));
describe
(
'staff add controller'
,
function
()
{
it
(
'should have a scope object'
,
inject
(
function
()
{
expect
(
$scope
).
toBeDefined
();
}));
it
(
'should get form'
,
inject
(
function
()
{
expect
(
$scope
.
form
).
not
.
toBe
(
null
);
}));
});
//describe('$scope.grade', function() {
// it('', function() {
// var $scope = {};
// var controller = $controller('StaffAddEditCtrl', { $scope: $scope });
// expect($scope).not.toBe(null);
// });
//});
//
//describe('staff add controller', function () {
//
// it('should have StaffAddEditCtrl', inject(function (ctrl) {
// expect(ctrl).toBeDefined();
// }));
//
// it('should get form', inject(function () {
// expect($scope.form).not.toBe(null);
// }));
//});
});
\ No newline at end of file
app/zetalib/forms/form_service_test.js
View file @
29c0a60c
...
...
@@ -9,6 +9,7 @@
describe
(
'form service module'
,
function
()
{
beforeEach
(
module
(
'zaerp'
));
beforeEach
(
module
(
'formService'
));
describe
(
'form service'
,
function
()
{
...
...
@@ -20,7 +21,7 @@ describe('form service module', function () {
var
form_json
=
{
email
:
'test@test.com'
,
id
:
2
,
name
:
'travolta'
};
var
form_generated
=
Generator
.
generate
(
form_json
);
expect
(
form_generated
).
toEqual
();
expect
(
form_generated
).
toEqual
(
form_json
);
}])
);
...
...
@@ -30,9 +31,25 @@ describe('form service module', function () {
var
group_json
=
{
group_objects
:
{
1
:[
'email'
,
'name'
],
2
:[
'password'
]}};
var
grouped_form
=
Generator
.
group
(
group_json
);
expect
(
grouped_form
).
toEqual
();
expect
(
grouped_form
).
toEqual
(
group_json
);
}])
);
it
(
'should get form'
,
inject
(
function
(
Generator
,
$httpBackend
)
{
$httpBackend
.
expectGET
(
'http://127.0.0.1:3000/api/student/add?email=test@test.com&'
)
.
respond
(
204
,
{
'id'
:
1
,
'user'
:
{
'id'
:
12
,
'role'
:
'admin'
}});
var
cred
=
{
email
:
'test@test.com'
};
Generator
.
get_form
(
'student/add'
,
cred
)
.
then
(
function
(
data
)
{
expect
(
data
).
not
.
toBe
(
null
);
});
$httpBackend
.
flush
();
})
);
});
});
\ No newline at end of file
karma.conf.js
View file @
29c0a60c
...
...
@@ -12,6 +12,8 @@ module.exports = function (config) {
files
:
[
'app/bower_components/angular/angular.js'
,
'app/bower_components/oclazyload/dist/ocLazyLoad.min.js'
,
'app/bower_components/angular-cookies/angular-cookies.min.js'
,
'app/bower_components/angular-route/angular-route.js'
,
'app/bower_components/angular-resource/angular-resource.js'
,
'app/bower_components/angular-sanitize/angular-sanitize.min.js'
,
...
...
@@ -21,8 +23,9 @@ module.exports = function (config) {
'app/bower_components/angular-schema-form/dist/bootstrap-decorator.min.js'
,
'app/bower_components/angular-mocks/angular-mocks.js'
,
'app/app.js'
,
'app/components/**/*.js'
,
'app/zetalib/**/*.js'
'app/app_routes.js'
,
'app/zetalib/**/*.js'
,
'app/components/**/*.js'
],
//preprocessors: {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment