UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Launchboard
launchboard-fe
Commits
b283c678
Commit
b283c678
authored
Oct 22, 2020
by
Ryan Acevedo
Browse files
updated courses to classes
parent
9aaa3a4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/api/services/training.js
src/api/services/training.js
+4
-4
tests/unit/api/services/training.spec.js
tests/unit/api/services/training.spec.js
+1
-1
No files found.
src/api/services/training.js
View file @
b283c678
...
@@ -102,8 +102,8 @@ export default {
...
@@ -102,8 +102,8 @@ export default {
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
toDelete
.
forEach
(
course
=>
{
toDelete
.
forEach
(
course
=>
{
const
index
=
data
.
c
our
ses
.
indexOf
(
course
);
const
index
=
data
.
c
las
ses
.
indexOf
(
course
);
data
.
c
our
ses
.
splice
(
index
,
1
);
data
.
c
las
ses
.
splice
(
index
,
1
);
});
});
resolve
();
resolve
();
...
@@ -115,7 +115,7 @@ export default {
...
@@ -115,7 +115,7 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
session
.
id
=
session
.
id
=
session
.
id
||
900
+
Math
.
floor
(
cryptoRand
()
*
Math
.
floor
(
1000
));
session
.
id
||
900
+
Math
.
floor
(
cryptoRand
()
*
Math
.
floor
(
1000
));
data
.
c
our
ses
.
push
(
session
);
data
.
c
las
ses
.
push
(
session
);
resolve
(
session
);
resolve
(
session
);
},
3500
);
},
3500
);
});
});
...
@@ -126,7 +126,7 @@ export default {
...
@@ -126,7 +126,7 @@ export default {
sessions
.
forEach
(
session
=>
{
sessions
.
forEach
(
session
=>
{
session
.
id
=
session
.
id
=
session
.
id
||
900
+
Math
.
floor
(
cryptoRand
()
*
Math
.
floor
(
1000
));
session
.
id
||
900
+
Math
.
floor
(
cryptoRand
()
*
Math
.
floor
(
1000
));
data
.
c
our
ses
.
push
(
session
);
data
.
c
las
ses
.
push
(
session
);
});
});
resolve
(
sessions
);
resolve
(
sessions
);
},
3000
);
},
3000
);
...
...
tests/unit/api/services/training.spec.js
View file @
b283c678
...
@@ -75,7 +75,7 @@ describe("training api", () => {
...
@@ -75,7 +75,7 @@ describe("training api", () => {
// dummy test until the API is ironed out
// dummy test until the API is ironed out
it
(
"
should get class
"
,
async
()
=>
{
it
(
"
should get class
"
,
async
()
=>
{
HTTP
.
get
=
jest
.
fn
().
mockResolvedValue
(
c
ourse
3
);
HTTP
.
get
=
jest
.
fn
().
mockResolvedValue
(
c
lass
3
);
let
response
=
await
TrainingApi
.
getClass
(
3
);
let
response
=
await
TrainingApi
.
getClass
(
3
);
expect
(
response
).
toEqual
(
class3
);
expect
(
response
).
toEqual
(
class3
);
...
...
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