Commit 5f6eabd1 authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'fix-update-user-list-404' into 'master'

Pass the iid of the User List on Update

See merge request gitlab-org/gitlab!39639
parents 433372bb 71ef42f4
......@@ -14,6 +14,7 @@ export const dismissErrorAlert = ({ commit }) => commit(types.DISMISS_ERROR_ALER
export const updateUserList = ({ commit, state }, userList) => {
return Api.updateFeatureFlagUserList(state.projectId, {
iid: userList.iid,
name: userList.name,
})
.then(({ data }) => redirectTo(data.path))
......
---
title: Pass the IID of the User List on Update
merge_request: 39639
author:
type: fixed
......@@ -111,6 +111,7 @@ describe('ee/user_lists/components/edit_user_list', () => {
it('should create a user list with the entered name', () => {
expect(Api.updateFeatureFlagUserList).toHaveBeenCalledWith('1', {
name: 'test',
iid: userList.iid,
});
});
......
......@@ -87,6 +87,7 @@ describe('User Lists Edit Actions', () => {
return testAction(actions.updateUserList, updatedList, state, [], [], () => {
expect(Api.updateFeatureFlagUserList).toHaveBeenCalledWith('1', {
name: updatedList.name,
iid: updatedList.iid,
});
expect(redirectTo).toHaveBeenCalledWith(userList.path);
});
......@@ -111,6 +112,7 @@ describe('User Lists Edit Actions', () => {
() =>
expect(Api.updateFeatureFlagUserList).toHaveBeenCalledWith('1', {
name: updatedList.name,
iid: updatedList.iid,
}),
);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment