BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
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');
...
@@ -35,15 +35,13 @@ require('~/lib/utils/text_utility');
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
);
expect
(
$
(
'.js-task-list-field'
).
val
()).
toBe
(
'- [x] Task List Item'
);
});
});
it
(
'submits
the form
on tasklist:changed'
,
function
()
{
it
(
'submits
an ajax request
on tasklist:changed'
,
function
()
{
var
submitted
=
false
;
spyOn
(
jQuery
,
'ajax'
).
and
.
callFake
(
function
(
req
)
{
$
(
'form'
).
on
(
'submit'
,
function
(
e
)
{
expect
(
req
.
type
).
toBe
(
'PATCH'
);
submitted
=
true
;
expect
(
req
.
url
).
toBe
(
'http://test.host/frontend-fixtures/issues-project/notes/1'
)
;
e
.
preventDefault
(
);
return
expect
(
req
.
data
.
note
).
not
.
toBe
(
null
);
});
});
return
$
(
'.js-task-list-field'
).
trigger
(
'tasklist:changed'
);
$
(
'.js-task-list-field'
).
trigger
(
'tasklist:changed'
);
expect
(
submitted
).
toBe
(
true
);
});
});
});
});
...
...
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