Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2084555a
Commit
2084555a
authored
Feb 09, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update karma test to expect ajax instead of POST
parent
4e4639b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
spec/javascripts/notes_spec.js
spec/javascripts/notes_spec.js
+6
-8
No files found.
spec/javascripts/notes_spec.js
View file @
2084555a
...
...
@@ -35,15 +35,13 @@ require('~/lib/utils/text_utility');
expect
(
$
(
'
.js-task-list-field
'
).
val
()).
toBe
(
'
- [x] Task List Item
'
);
});
it
(
'
submits
the form
on tasklist:changed
'
,
function
()
{
var
submitted
=
false
;
$
(
'
form
'
).
on
(
'
submit
'
,
function
(
e
)
{
submitted
=
true
;
e
.
preventDefault
(
);
it
(
'
submits
an ajax request
on tasklist:changed
'
,
function
()
{
spyOn
(
jQuery
,
'
ajax
'
).
and
.
callFake
(
function
(
req
)
{
expect
(
req
.
type
).
toBe
(
'
PATCH
'
);
expect
(
req
.
url
).
toBe
(
'
http://test.host/frontend-fixtures/issues-project/notes/1
'
)
;
return
expect
(
req
.
data
.
note
).
not
.
toBe
(
null
);
});
$
(
'
.js-task-list-field
'
).
trigger
(
'
tasklist:changed
'
);
expect
(
submitted
).
toBe
(
true
);
return
$
(
'
.js-task-list-field
'
).
trigger
(
'
tasklist:changed
'
);
});
});
...
...
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