Commit 19fe2cd2 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'ag-trim-input' into 'master'

Trim input from subscription activation from

See merge request gitlab-org/gitlab!62695
parents 7ff1e6f8 58a44b27
......@@ -136,7 +136,7 @@ export default {
</label>
<gl-form-input
id="activation-code-group"
v-model="form.fields.activationCode.value"
v-model.trim="form.fields.activationCode.value"
v-validation:[form.showValidation]
:disabled="isLoading"
:placeholder="$options.i18n.pasteActivationCode"
......
......@@ -23,7 +23,8 @@ localVue.use(VueApollo);
describe('CloudLicenseApp', () => {
let wrapper;
const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT';
const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT ';
const fakeActivationCodeTrimmed = 'gEg959hDCkvM2d4Der5RyktT';
const createMockApolloProvider = (resolverMock) => {
localVue.use(VueApollo);
......@@ -134,7 +135,7 @@ describe('CloudLicenseApp', () => {
it('calls mutate with the correct variables', () => {
expect(mutationMock).toHaveBeenCalledWith({
gitlabSubscriptionActivateInput: {
activationCode: fakeActivationCode,
activationCode: fakeActivationCodeTrimmed,
},
});
});
......
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