Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alfa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
alfa
Commits
f78fd113
Commit
f78fd113
authored
8 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-4681 fix test
parent
b349220d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
alfa-client/libs/postfach-shared/src/lib/postfach.util.spec.ts
+21
-33
21 additions, 33 deletions
...client/libs/postfach-shared/src/lib/postfach.util.spec.ts
with
21 additions
and
33 deletions
alfa-client/libs/postfach-shared/src/lib/postfach.util.spec.ts
+
21
−
33
View file @
f78fd113
...
@@ -92,34 +92,26 @@ describe('PostfachUtil', () => {
...
@@ -92,34 +92,26 @@ describe('PostfachUtil', () => {
});
});
describe
(
'
getMessageCodeMessage
'
,
()
=>
{
describe
(
'
getMessageCodeMessage
'
,
()
=>
{
it
(
it
(
'
should return message for messageCode
'
+
PostfachNachrichtMessageCode
.
CONNECTION_FAILED
,
()
=>
{
'
should return message for messageCode
'
+
PostfachNachrichtMessageCode
.
CONNECTION_FAILED
,
()
=>
{
var
result
=
getMessageCodeMessage
({
var
result
=
getMessageCodeMessage
({
...
createPostfachMailResource
(),
...
createPostfachMailResource
(),
messageCode
:
PostfachNachrichtMessageCode
.
CONNECTION_FAILED
,
messageCode
:
PostfachNachrichtMessageCode
.
CONNECTION_FAILED
,
});
});
expect
(
result
).
toEqual
(
expect
(
result
).
toEqual
(
'
Verbindungsfehler: Die Verbindung zum Zielserver des Postfachs ist nicht zustandegekommen.
'
);
'
Verbindungsfehler: Die Verbindung zum Zielserver des Osi-Postfachs ist nicht zustandegekommen.
'
,
});
);
},
);
it
(
it
(
'
should return message for messageCode
'
+
PostfachNachrichtMessageCode
.
PROCESSING_FAILED
,
()
=>
{
'
should return message for messageCode
'
+
PostfachNachrichtMessageCode
.
PROCESSING_FAILED
,
()
=>
{
var
result
=
getMessageCodeMessage
({
var
result
=
getMessageCodeMessage
({
...
createPostfachMailResource
(),
...
createPostfachMailResource
(),
messageCode
:
PostfachNachrichtMessageCode
.
PROCESSING_FAILED
,
messageCode
:
PostfachNachrichtMessageCode
.
PROCESSING_FAILED
,
});
});
expect
(
result
).
toEqual
(
expect
(
result
).
toEqual
(
'
Fehlerhafte Verarbeitung: Die Nachricht wurde an das Osi-Postfach geschickt, konnte dort aber nicht richtig verarbeitet werden.
'
,
'
Fehlerhafte Verarbeitung: Die Nachricht wurde an das Postfach geschickt, konnte dort aber nicht richtig verarbeitet werden.
'
,
);
},
);
);
});
});
});
describe
(
'
getPostfacNachrichtenCount
'
,
()
=>
{
describe
(
'
getPostfacNachrichtenCount
'
,
()
=>
{
describe
(
'
return NONE
'
,
()
=>
{
describe
(
'
return NONE
'
,
()
=>
{
...
@@ -153,9 +145,7 @@ describe('PostfachUtil', () => {
...
@@ -153,9 +145,7 @@ describe('PostfachUtil', () => {
});
});
it
(
'
should return SINGLE on one existing resources
'
,
()
=>
{
it
(
'
should return SINGLE on one existing resources
'
,
()
=>
{
var
listResource
:
PostfachMailListResource
=
createListResource
([
var
listResource
:
PostfachMailListResource
=
createListResource
([
createPostfachMailResource
()]);
createPostfachMailResource
(),
]);
var
count
:
PostfachNachrichtenCount
=
getPostfachNachrichtenCount
(
listResource
);
var
count
:
PostfachNachrichtenCount
=
getPostfachNachrichtenCount
(
listResource
);
...
@@ -170,9 +160,7 @@ describe('PostfachUtil', () => {
...
@@ -170,9 +160,7 @@ describe('PostfachUtil', () => {
expect
(
count
).
toBe
(
PostfachNachrichtenCount
.
MULTIPLE
);
expect
(
count
).
toBe
(
PostfachNachrichtenCount
.
MULTIPLE
);
});
});
function
createListResource
(
function
createListResource
(
postfachMailResources
:
PostfachMailResource
[]):
PostfachMailListResource
{
postfachMailResources
:
PostfachMailResource
[],
):
PostfachMailListResource
{
return
toResource
({},
[],
{
return
toResource
({},
[],
{
[
PostfachMailListLinkRel
.
POSTFACH_MAIL_LIST
]:
postfachMailResources
,
[
PostfachMailListLinkRel
.
POSTFACH_MAIL_LIST
]:
postfachMailResources
,
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment