Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #133 from mattermost/test-email
Browse files Browse the repository at this point in the history
Add config argument to test email action
  • Loading branch information
jwilander authored and hmhealey committed Aug 28, 2020
1 parent 051223b commit b57f1ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions packages/mattermost-redux/src/actions/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ export function reloadConfig() {
);
}

export function testEmail() {
export function testEmail(config) {
return bindClientFunc(
Client4.testEmail,
AdminTypes.TEST_EMAIL_REQUEST,
AdminTypes.TEST_EMAIL_SUCCESS,
AdminTypes.TEST_EMAIL_FAILURE
AdminTypes.TEST_EMAIL_FAILURE,
config
);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/mattermost-redux/src/client/client4.js
Original file line number Diff line number Diff line change
Expand Up @@ -1087,10 +1087,10 @@ export default class Client4 {
);
};

testEmail = async () => {
testEmail = async (config) => {
return this.doFetch(
`${this.getBaseRoute()}/email/test`,
{method: 'post'}
{method: 'post', body: JSON.stringify(config)}
);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/mattermost-redux/test/actions/admin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe('Actions.Admin', () => {
post('/email/test').
reply(200, OK_RESPONSE);

await Actions.testEmail()(store.dispatch, store.getState);
await Actions.testEmail({})(store.dispatch, store.getState);

const state = store.getState();
const request = state.requests.admin.testEmail;
Expand Down

0 comments on commit b57f1ad

Please sign in to comment.