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
dde2e2bb
Commit
dde2e2bb
authored
Apr 18, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GroupMemberContributions Service
parent
f9a9e9a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
ee/app/assets/javascripts/group_member_contributions/service/group_member_service.js
...roup_member_contributions/service/group_member_service.js
+11
-0
spec/javascripts/group_member_contributions/service/group_member_service_spec.js
...member_contributions/service/group_member_service_spec.js
+27
-0
No files found.
ee/app/assets/javascripts/group_member_contributions/service/group_member_service.js
0 → 100644
View file @
dde2e2bb
import
axios
from
'
~/lib/utils/axios_utils
'
;
export
default
class
GroupMemberService
{
constructor
(
memberContributionsPath
)
{
this
.
memberContributionsPath
=
memberContributionsPath
;
}
getContributedMembers
()
{
return
axios
.
get
(
this
.
memberContributionsPath
);
}
}
spec/javascripts/group_member_contributions/service/group_member_service_spec.js
0 → 100644
View file @
dde2e2bb
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
GroupMemberService
from
'
ee/group_member_contributions/service/group_member_service
'
;
import
{
contributionsPath
}
from
'
../mock_data
'
;
describe
(
'
GroupMemberService
'
,
()
=>
{
let
service
;
beforeEach
(()
=>
{
service
=
new
GroupMemberService
(
contributionsPath
);
});
describe
(
'
constructor
'
,
()
=>
{
it
(
'
initializes default properties
'
,
()
=>
{
expect
(
service
.
memberContributionsPath
).
toBe
(
contributionsPath
);
});
});
describe
(
'
getContributedMembers
'
,
()
=>
{
it
(
'
returns axios instance for memberContributionsPath
'
,
()
=>
{
spyOn
(
axios
,
'
get
'
).
and
.
stub
();
service
.
getContributedMembers
();
expect
(
axios
.
get
).
toHaveBeenCalledWith
(
service
.
memberContributionsPath
);
});
});
});
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