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
0df11b33
Commit
0df11b33
authored
May 05, 2021
by
Keith Becker
Browse files
refactor unit tests
parent
ecf2524c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
src/components/Dialogs/AddStudentsToCourseDialog.vue
src/components/Dialogs/AddStudentsToCourseDialog.vue
+0
-4
tests/unit/components/Dialogs/AddStudentsToCourseDialog.spec.js
...unit/components/Dialogs/AddStudentsToCourseDialog.spec.js
+12
-0
No files found.
src/components/Dialogs/AddStudentsToCourseDialog.vue
View file @
0df11b33
...
@@ -64,10 +64,6 @@ export default {
...
@@ -64,10 +64,6 @@ export default {
this
.
course
.
id
this
.
course
.
id
);
);
this
.
course
.
registrations
=
result
.
registrations
;
this
.
course
.
registrations
=
result
.
registrations
;
console
.
log
(
"
updated add students to course dialog registrations is now
"
+
this
.
course
.
registrations
.
length
);
},
},
availableSeatsInCourse
,
availableSeatsInCourse
,
canAddStudentsToCourse
,
canAddStudentsToCourse
,
...
...
tests/unit/components/Dialogs/AddStudentsToCourseDialog.spec.js
View file @
0df11b33
...
@@ -108,4 +108,16 @@ describe("SelectAddStudentsToCourseDialog", () => {
...
@@ -108,4 +108,16 @@ describe("SelectAddStudentsToCourseDialog", () => {
await
wrapper
.
vm
.
$nextTick
();
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
vm
.
canSubmit
).
toEqual
(
true
);
expect
(
wrapper
.
vm
.
canSubmit
).
toEqual
(
true
);
});
});
it
(
"
should call getCourseRegistrationsById when fetchDebouced is called
"
,
async
()
=>
{
CourseService
.
getCourseRegistrationsById
=
jest
.
fn
()
.
mockResolvedValue
({
registrations
:
[]
});
CourseService
.
getCourse
=
jest
.
fn
().
mockResolvedValue
({
name
:
""
,
startDate
:
"
2020-01-01
"
,
});
await
wrapper
.
vm
.
fetchDebounced
();
expect
(
CourseService
.
getCourseRegistrationsById
).
toHaveBeenCalled
();
expect
(
CourseService
.
getCourse
).
toHaveBeenCalled
();
});
});
});
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