Commit 58a44b27 authored by Angelo Gulina's avatar Angelo Gulina

Trim the value from the input

parent 11a4bfc7
......@@ -131,7 +131,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"
......
......@@ -22,7 +22,8 @@ localVue.use(VueApollo);
describe('CloudLicenseApp', () => {
let wrapper;
const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT';
const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT ';
const fakeActivationCodeTrimmed = 'gEg959hDCkvM2d4Der5RyktT';
const createMockApolloProvider = (resolverMock) => {
localVue.use(VueApollo);
......@@ -133,7 +134,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