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
7ef6d9b3
Commit
7ef6d9b3
authored
Jul 01, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rest url DRY prensibine göre güncellendi
parent
b311140e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
auth_test.js
app/components/auth/auth_test.js
+2
-2
form_service_test.js
app/zetalib/forms/form_service_test.js
+4
-4
No files found.
app/components/auth/auth_test.js
View file @
7ef6d9b3
...
@@ -59,11 +59,11 @@ describe('zaerp.auth module', function () {
...
@@ -59,11 +59,11 @@ describe('zaerp.auth module', function () {
});
});
it
(
'should get login success'
,
it
(
'should get login success'
,
inject
(
function
(
LoginService
,
$httpBackend
,
$location
)
{
inject
(
function
(
LoginService
,
$httpBackend
,
$location
,
RESTURL
)
{
// use httpBackend to imitate login api
// use httpBackend to imitate login api
$httpBackend
.
expectGET
(
'http://127.0.0.1:3000/api/
login?email=test@test.com&password=password&'
)
$httpBackend
.
expectGET
(
RESTURL
.
url
+
'
login?email=test@test.com&password=password&'
)
// todo: with real api change response data from list to obj
// todo: with real api change response data from list to obj
.
respond
(
200
,
[{
'id'
:
1
,
'user'
:
{
'id'
:
12
,
'role'
:
'admin'
},
'success'
:
true
}]);
.
respond
(
200
,
[{
'id'
:
1
,
'user'
:
{
'id'
:
12
,
'role'
:
'admin'
},
'success'
:
true
}]);
...
...
app/zetalib/forms/form_service_test.js
View file @
7ef6d9b3
...
@@ -36,15 +36,15 @@ describe('form service module', function () {
...
@@ -36,15 +36,15 @@ describe('form service module', function () {
);
);
it
(
'should get form'
,
it
(
'should get form'
,
inject
(
function
(
Generator
,
$httpBackend
)
{
inject
(
function
(
Generator
,
$httpBackend
,
RESTURL
)
{
$httpBackend
.
expectGET
(
'http://127.0.0.1:3000/api/
student/add?email=test@test.com&'
)
$httpBackend
.
expectGET
(
RESTURL
.
url
+
'
student/add?email=test@test.com&'
)
.
respond
(
20
4
,
{
'id'
:
1
,
'user'
:
{
'id'
:
12
,
'role'
:
'admin'
}}
);
.
respond
(
20
0
,
[{
form
:
'form'
}]
);
var
cred
=
{
email
:
'test@test.com'
};
var
cred
=
{
email
:
'test@test.com'
};
Generator
.
get_form
(
'student/add'
,
cred
)
Generator
.
get_form
(
'student/add'
,
cred
)
.
then
(
function
(
data
)
{
.
then
(
function
(
data
)
{
expect
(
data
).
not
.
toBe
(
null
);
expect
(
data
).
toEqual
({
form
:
'form'
}
);
});
});
$httpBackend
.
flush
();
$httpBackend
.
flush
();
...
...
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