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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d06f350d
Commit
d06f350d
authored
Apr 05, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sidebar assignee service
parent
17a532a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
spec/javascripts/vue_sidebar_assignees/services/sidebar_assignees_service_spec.js
...ebar_assignees/services/sidebar_assignees_service_spec.js
+32
-0
No files found.
spec/javascripts/vue_sidebar_assignees/services/sidebar_assignees_service_spec.js
0 → 100644
View file @
d06f350d
import
SidebarAssigneesService
from
'
~/vue_sidebar_assignees/services/sidebar_assignees_service
'
;
describe
(
'
SidebarAssigneesService
'
,
()
=>
{
let
service
;
beforeEach
(()
=>
{
service
=
new
SidebarAssigneesService
(
''
,
'
field
'
);
});
describe
(
'
constructor
'
,
()
=>
{
it
(
'
should save field
'
,
()
=>
{
expect
(
service
.
field
).
toEqual
(
'
field
'
);
});
it
(
'
should save sidebarAssigneeResource
'
,
()
=>
{
expect
(
service
.
sidebarAssigneeResource
).
toBeDefined
();
});
});
describe
(
'
update
'
,
()
=>
{
it
(
'
should call vue resource update
'
,
(
done
)
=>
{
const
userIds
=
[
1
,
2
,
3
];
spyOn
(
service
.
sidebarAssigneeResource
,
'
update
'
).
and
.
callFake
((
o
)
=>
{
expect
(
o
.
field
).
toEqual
(
userIds
);
done
();
});
service
.
update
(
userIds
);
});
});
});
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